ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Dealing with <!DOCTYPE in an XML Message

Post new topic  Reply to topic
 Dealing with <!DOCTYPE in an XML Message « View previous topic :: View next topic » 
Author Message
megani
PostPosted: Wed Jul 30, 2003 2:29 pm    Post subject: Dealing with <!DOCTYPE in an XML Message Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Wed Jul 30, 2003 3:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
megani
PostPosted: Wed Jul 30, 2003 3:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Wed Jul 30, 2003 3:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kirani
PostPosted: Wed Jul 30, 2003 4:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
megani
PostPosted: Thu Jul 31, 2003 4:38 am    Post subject: Reply with quote

Apprentice

Joined: 19 Dec 2001
Posts: 27

Thanks so much Kiran. That worked wonderfully.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Dealing with <!DOCTYPE in an XML Message
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.