|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem with XML declaration |
« View previous topic :: View next topic » |
Author |
Message
|
cronydude |
Posted: Fri Jan 18, 2002 4:54 am Post subject: |
|
|
 Voyager
Joined: 11 Nov 2001 Posts: 85 Location: US
|
hi,
I have a incomming XML message which has DOCTYPE declaration referring to some DTD.I want the output xml file with out that declaration.
For example if the incomming file is:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE ADD_SALESORDER_004 SYSTEM "085_add_salesorder_004.dtd">
<Test>
.
.
.
</Test>
the output expected is :
<?xml version="1.0" standalone="no"?>
<Test>
.
.
.
</Test>
I tried to make the declaration null, but it bounced.
Any help in this regard is appreciated.
regards
crony
[ This Message was edited by: cronydude on 2002-01-18 04:55 ] |
|
Back to top |
|
 |
nik_shaw |
Posted: Fri Jan 18, 2002 6:51 am Post subject: |
|
|
 Novice
Joined: 17 Jan 2002 Posts: 11 Location: London
|
Crony,
what you need to do is to use a compute node in your message flow.
Change the properties of the node to "copy message headers", then set the contents of the E-SQL tab to something like the following :
DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
-- Define XML Header Information
SET OutputRoot.XML.(XML.XmlDecl)='';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version)='1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Encoding)='utf-8';
-- Write out tags
SET OutputRoot.XML.Test=InputRoot.XML.Test;
the above 2 sections will write out a new XML header and will copy all data from Input to Output bewteen ....
Alternatively if you don't want to use E-SQL and a compute node then you can now shell out to XSLT using the supportpac plugins
good luck
Nik |
|
Back to top |
|
 |
cronydude |
Posted: Fri Jan 18, 2002 7:38 am Post subject: |
|
|
 Voyager
Joined: 11 Nov 2001 Posts: 85 Location: US
|
hi nik,
Thanks for responding.
I will try n get back.
regards,
crony
[ This Message was edited by: cronydude on 2002-01-18 07:39 ] |
|
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
|
|
|
|