|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Dealing with <!DOCTYPE in an XML Message |
« View previous topic :: View next topic » |
Author |
Message
|
megani |
Posted: Wed Jul 30, 2003 2:29 pm Post subject: Dealing with <!DOCTYPE in an XML Message |
|
|
Apprentice
Joined: 19 Dec 2001 Posts: 27
|
Hello, when I put an XML message through my flow and it has the
<!DOCTYPE .... my susbsequent transformation in a compute does not work. However, without the <!DOCTYPE ... the transformation and addressing of the XML tree works fine.
These XML messages will always have the <!DOCTYPE, does anyone know how I can have WMQI take out the <!DOCTYPE. I have been trying to manipulate the XML message as a BLOB, taking it out and piecing the XML message back together, and then reset it back to an XML domain, but am having no luck.
Perhaps there is a way to NULL out <!DOCTYPE.
I'd appreciate any input.
Thanks folks. |
|
Back to top |
|
 |
kirani |
Posted: Wed Jul 30, 2003 3:04 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Could you post your sample input message here? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
megani |
Posted: Wed Jul 30, 2003 3:12 pm Post subject: |
|
|
Apprentice
Joined: 19 Dec 2001 Posts: 27
|
Kiran, the message is very large. Can I email it to you. Need you address.
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Wed Jul 30, 2003 3:18 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I send you my email address. Please check your PM. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
kirani |
Posted: Wed Jul 30, 2003 4:15 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Based on your input message layout, I created a small example message flow where I send similar input XML message,
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE XMI SYSTEM "mqsi.dtd" ><XMI xmi.version="1.0"> <XMI.header>
<XMI.documentation/>
</XMI.header>
<XMI.content>
<Test>ABC</Test>
</XMI.content>
</XMI>
|
The Trace output for this XML message looks like this,
Code: |
(0x1000010)XML = (
(0x5000018)XML = (
(0x6000011) = '1.0'
(0x6000012) = 'UTF-8'
)
(0x5000020)XMI = (
(0x6000008) = 'mqsi.dtd'
(0x5000022) =
)
(0x1000000)XMI = (
(0x3000000)xmi.version = '1.0'
(0x2000000) = ' '
(0x1000000)XMI.header = (
(0x1000000)XMI.documentation =
)
(0x1000000)XMI.content = (
(0x1000000)Test = (
(0x2000000) = 'ABC'
)
)
)
)
|
Following code in a compute node will show you how to read XML elements from this message with DOCTYPE declaration and it will also remove this declaration from output message. Don't forget to select Copy Message Headers in this compute node.
Code: |
SET Environment.Variables.Test = InputRoot.XML.(XML.Element)XMI."XMI.content"."Test";
SET OutputRoot.XML.(XML.DocTypeDecl)XMI = NULL;
|
Output message ..
Code: |
<?xml version="1.0" encoding="UTF-8"?><XMI xmi.version="1.0"> <XMI.header>
<XMI.documentation/>
</XMI.header>
<XMI.content>
<Test>ABC</Test>
</XMI.content>
</XMI>
|
I hope this helps! _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
megani |
Posted: Thu Jul 31, 2003 4:38 am Post subject: |
|
|
Apprentice
Joined: 19 Dec 2001 Posts: 27
|
Thanks so much Kiran. That worked wonderfully. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|