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 » How to write <?xml ?> tag in XML1 message set?

Post new topic  Reply to topic
 How to write <?xml ?> tag in XML1 message set? « View previous topic :: View next topic » 
Author Message
NiceGuy
PostPosted: Wed Aug 18, 2010 2:43 pm    Post subject: How to write <?xml ?> tag in XML1 message set? Reply with quote

Apprentice

Joined: 11 Jun 2009
Posts: 37

Hello community,

I have created a message set that I need to write to. The
message set is an xml (XML1) message set and appears to be working
fine when creating the out document that utilizes the message set ...

However ....

My xml out document needs to start with the line ...

Quote:
<?xml version="1.0"?>


So I need to add an element at the start of my message set
that adds this .. but I have no clue how.

Can somebody help me with this? I am not that experienced with message broker so please bare with me.

Thank-you for your time.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 18, 2010 8:19 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Look up the "XML.Declaration" and "XMLNSC.Declaration" in the broker's info center
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Aug 19, 2010 2:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
Look up the "XML.Declaration" and "XMLNSC.Declaration" in the broker's info center


Neither of those will help with the MRM-XML domain. (you need more tea...)

Presumably the "Suppress XML Declaration" property of the physical format in the message set definition has been checked.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 19, 2010 7:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Although it would make sense that he is using MRM I still must be missing some of that tea boost because I did not find any mention of a parser or WMB version in the OP's message...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Thu Aug 19, 2010 9:06 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

maybe here:-
Quote:

I have created a message set that I need to write to. The
message set is an xml (XML1) message set

_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 19, 2010 10:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

smdavies99 wrote:
maybe here:-
Quote:

I have created a message set that I need to write to. The
message set is an xml (XML1) message set


At least, that's what I used in deciding NiceGuy is using MRM-XML.
Back to top
View user's profile Send private message
NiceGuy
PostPosted: Thu Aug 19, 2010 11:24 am    Post subject: Reply with quote

Apprentice

Joined: 11 Jun 2009
Posts: 37

Hi community,

Thanks for the help thus far ...

For clarity, I am using the MRM domain.

mqjeff writes:
Quote:
presumably the "Suppress XML Declaration" property of the physical format in the message set definition has been checked.


The "Suppress XML Declaration" has not been checked off in the .mset file which is why I find this troubling.

My desired output would be of the form:
Code:
<?xml version="1.0"?><CR><LF>
<Batch><record></record></Batch>


*Please note I merely placed the <CR><LF> for clarity of the presence of a new line as I obviously do not what the "<CR><LF>" characters literally written out.

However what I am currently getting is
Quote:
<Batch xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><record></record></Batch>


So in summary I am not getting my XML declaration in addition to getting the following junk
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"


I pretty sure I am close but have exhausted all ideas given my limited experience.

Thanks again for the guidance and coaching
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 19, 2010 1:01 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What version of Broker are you using?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Aug 23, 2010 3:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

My advice is to stop using MRM XML in a new message flow. XMLNSC offers far better control over the output XML ( as you are finding out ).
Something like this ought to do the trick:
Code:
SET OutputRoot.XMLNSC.myRootTagName = InputRoot.MRM;
CREATE FIRSTCHILD OF OutputRoot.XMLNSC TYPE XMLNSC.XmlDeclaration;
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = '1.0';
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 » How to write <?xml ?> tag in XML1 message set?
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.