|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XML file transformation |
« View previous topic :: View next topic » |
Author |
Message
|
Bharat |
Posted: Mon Oct 27, 2003 6:47 am Post subject: XML file transformation |
|
|
 Acolyte
Joined: 14 May 2002 Posts: 61 Location: Reston, VA, USA
|
Hi,
I'm trying to generate an output XML file based on the input XML file supplied to Compute Node in MQSI 2.0.1. Everything is ok, but I'm unable to generate the following XML tag.
Quote: |
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SampleMethod.xsd"> |
I'm using the following code to generate the above request tag.
Code: |
Set OutputRoot.XML.tmrroot.request.(XML.attr)xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance';
Set OutputRoot.XML.tmrroot.request.(XML.attr)xsi:noNamespaceSchemaLocation='SampleMethod.xsd'; |
I'm getting the following error.
Quote: |
BIP2401E: (37, 46) : Syntax error : expected '=' but found ':'.
The expected token was not found.
Correct the syntax of your expression and redeploy the message flow. |
I tried using '\' as escape character as mentioned below. But it didn't work.
Code: |
Set OutputRoot.XML.tmrroot.request.(XML.attr)xmlns\:xsi='http://www.w3.org/2001/XMLSchema-instance';
Set OutputRoot.XML.tmrroot.request.(XML.attr)xsi\:noNamespaceSchemaLocation='SampleMethod.xsd'; |
Is there anyway, to include the ':' in my output XML file's request attribute name? I know it is simple question, but I don't have a clue. Could you please help me in this?
Also, right now I'm hardcoding all the output XML tags in my compute node. There is no problem with this. But is there anyway that I can specify the DTD of my output XML file to any node and map all the fields of my input file?
Thank in advance,
Bharat |
|
Back to top |
|
 |
gabbar |
Posted: Mon Oct 27, 2003 7:09 am Post subject: |
|
|
Acolyte
Joined: 10 Dec 2002 Posts: 50
|
Try putting xmlns:xsi with double quotes as in:
Quote: |
OutputRoot.XML.tmrroot.request.(XML.attr)"xmlns:xsi" = 'your value'; |
[/b][/quote] |
|
Back to top |
|
 |
Bharat |
Posted: Mon Oct 27, 2003 8:41 am Post subject: |
|
|
 Acolyte
Joined: 14 May 2002 Posts: 61 Location: Reston, VA, USA
|
Gabbar,
Your suggetion worked well. Thank you so much.
Is there anyway we can directly use or specify the output XML file DTD to any node in MQSI and map the XML tags from an input XML file to another output XML file?
Thanks,
Bharat |
|
Back to top |
|
 |
gabbar |
Posted: Mon Oct 27, 2003 9:28 am Post subject: |
|
|
Acolyte
Joined: 10 Dec 2002 Posts: 50
|
You can import the DTD for your output XML. However, that will be an MRM XML and there is a tradeoff that you will have to consider. Performance wise, your current procedure is better than importing DTDs. If performance is not an issue, try DTD import. I am not sure though if your version of WMQI supports DTD import. |
|
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
|
|
|
|