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 » Problem with XML declaration

Post new topic  Reply to topic
 Problem with XML declaration « View previous topic :: View next topic » 
Author Message
cronydude
PostPosted: Fri Jan 18, 2002 4:54 am    Post subject: Reply with quote

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
View user's profile Send private message
nik_shaw
PostPosted: Fri Jan 18, 2002 6:51 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
cronydude
PostPosted: Fri Jan 18, 2002 7:38 am    Post subject: Reply with quote

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
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 » Problem with XML declaration
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.