Author |
Message
|
jbacskai |
Posted: Tue Sep 21, 2004 11:43 am Post subject: XML Declaration is needed |
|
|
 Apprentice
Joined: 30 Dec 2002 Posts: 26 Location: Hungary
|
Hi All,
WMQI 2.1
I need the <?xml version=’1.0’> XML declaration in my output message.
How could I put it in?
I haven't declared the message in any message set and I would not like to do it.
Please send an example!
SET OutputRoot.XML.Test_msg.???
Regards,
JBacskai |
|
Back to top |
|
 |
jbacskai |
Posted: Tue Sep 21, 2004 12:14 pm Post subject: |
|
|
 Apprentice
Joined: 30 Dec 2002 Posts: 26 Location: Hungary
|
OK I found it!
SET OutputRoot.XML.(XML.XmlDecl) = '';
SET OutputRoot.XML.(XML.XmlDecl.Version) = '1.0';
SET OutputRoot.XML.(XML.XmlDecl."Encoding") = 'UTF-8'; |
|
Back to top |
|
 |
Testo |
Posted: Wed Feb 02, 2005 2:48 am Post subject: Similar situation but in XMLNS... |
|
|
 Centurion
Joined: 26 Feb 2003 Posts: 120 Location: Italy - Milan
|
For the XMLNS domain, I have adapted your instructions in the following way:
Code: |
SET OutputRoot.XMLNS.(XML.XmlDecl) = '';
SET OutputRoot.XMLNS.(XML.XmlDecl.Version) = '1.0';
SET OutputRoot.XMLNS.(XML.XmlDecl."Encoding") = 'UTF-8';
|
but it does not work.
What am I missing?
Thanks,
Andrea Tedone
IBM IT Specialist[/code] |
|
Back to top |
|
 |
Testo |
Posted: Wed Feb 02, 2005 4:33 am Post subject: Help! |
|
|
 Centurion
Joined: 26 Feb 2003 Posts: 120 Location: Italy - Milan
|
Here is my chunck of code... anyone able to help me?
Code: |
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
DECLARE NS1 NAMESPACE 'http://www.ibm.com';
-- SET OutputRoot.Properties.MessageDomain = 'XML';
CREATE FIRSTCHILD OF OutputRoot.XML;
-- XML Declarations
SET OutputRoot.XML.(XML.XmlDecl) = '';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';
SET OutputRoot.XML = InputRoot.XMLNS.NS1:msg;
RETURN TRUE;
|
and the XML message in input is something like
Code: |
<?xml version="1.0" encoding="utf-8"?>
<msg xmlns="http://www.ibm.com">
<RuleEngineDataset xmlns=
...
</RuleEngineDataset >
</msg>
|
Help!
Thanks
Andrea |
|
Back to top |
|
 |
JLRowe |
Posted: Wed Feb 02, 2005 4:40 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
You need to use the XMLNS parser, you are using the XML parser which does not support namespaces.
e.g. SET OutputRoot.XMLNS.(XML.XmlDecl) = ''; |
|
Back to top |
|
 |
Testo |
Posted: Wed Feb 02, 2005 5:27 am Post subject: already tried |
|
|
 Centurion
Joined: 26 Feb 2003 Posts: 120 Location: Italy - Milan
|
already tried also with OutputRoot.XMLNS.(XML.XmlDecl) = '' and also for the other instructions but with no success....
Any other idea? |
|
Back to top |
|
 |
nathanw |
Posted: Thu Feb 03, 2005 1:54 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
I assume you are actually settinig the default domain to XMLNS and not XML
Code: |
DECLARE xmlns NAMESPACE 'urn:hl7-org:v3';
DECLARE xsi NAMESPACE 'urn:hl7-org:v3 ../Schemas/PORX_MT024001UK05.xsd';
SET "OutputRoot"."XMLNS"."DispenseClaimInformation".(XML.NamespaceDecl)xmlns:space1 = 'urn:hl7-org:v3';
SET "OutputRoot"."XMLNS"."DispenseClaimInformation".xmlns:data1 = 'http://www.w3.org/2001/XMLSchema-instance';
|
I use the code above for mine in V5
Hope that helps
Also I have a ResetContent Decriptor Node in the flow setting it to XMLNS |
|
Back to top |
|
 |
|