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 » Dynamic generation of XML with namespace

Post new topic  Reply to topic
 Dynamic generation of XML with namespace « View previous topic :: View next topic » 
Author Message
purple_soft
PostPosted: Mon Feb 05, 2007 10:55 am    Post subject: Dynamic generation of XML with namespace Reply with quote

Newbie

Joined: 05 Feb 2007
Posts: 1

In the Message Broker InfoCenter - Manipulating messages in the XMLNS domain

The ESQL code sample below

Code:

DECLARE sp1 NAMESPACE 'http://www.ibm.com/space1';
DECLARE sp2 NAMESPACE 'http://www.ibm.com/space2';
DECLARE sp3 NAMESPACE 'http://www.ibm.com/space3';

-- Namespace declaration to associate prefix 'space1' with the namespace
SET OutputRoot.XMLNS.message.(XML.NamespaceDecl)xmlns:space1 = 'http://www.ibm.com/space1'; 
SET OutputRoot.XMLNS.message.sp1:data1 = 'Hello!';     
 
-- Default Namespace declaration
SET OutputRoot.XMLNS.message.sp2:data2.(XML.NamespaceDecl)xmlns = 'http://www.ibm.com/space2';
SET OutputRoot.XMLNS.message.sp2:data2.sp2:subData1 = 'Hola!';
SET OutputRoot.XMLNS.message.sp2:data2.sp2:subData2 = 'Guten Tag!';

SET OutputRoot.XMLNS.message.sp3:data3 = 'Bonjour!';

SET OutputRoot.Properties.MessageDomain = 'XMLNS';


Produce a xml message below:

Code:

<message xmlns:space1="http://www.ibm.com/space1">
 <space1:data1>Hello!</space1:data1>
 <data2 xmlns="http://www.ibm.com/space2">
  <subData1>Hola!</subData1>
  <subData2>Guten Tag!</subData2>
 </data2>
 <NS1:data3 xmlns:NS1="http://www.ibm.com/space3">Bonjour!</NS1:data3>
</message>


Question:
What modification to the ESQL code is requires to produce the XML message below?
Code:

<space1:message xmlns:space1="http://www.ibm.com/space1">
:
:
</space1:message>
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Feb 05, 2007 3:59 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Have a read of this:
http://www.mqseries.net/phpBB2/viewtopic.php?t=34746&postdays=0&postorder=asc&start=12
...and then ask again if you still have questions
Back to top
View user's profile Send private message
vsr
PostPosted: Wed Feb 07, 2007 7:04 am    Post subject: Reply with quote

Centurion

Joined: 04 Apr 2006
Posts: 104

try this

DECLARE space1 NAMESPACE 'http://www.ibm.com/space1';

SET OutputRoot.XMLNS.space1:message.sp1:data1 = 'Hello!';[/b]
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 » Dynamic generation of XML with namespace
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.