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 » Help required !!!

Post new topic  Reply to topic
 Help required !!! « View previous topic :: View next topic » 
Author Message
elvis_gn
PostPosted: Sun Nov 28, 2004 12:02 am    Post subject: Help required !!! Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

How can i create an XML with same field names.
For example:
<Name>
<First> </First>
<Last> </Last>
</Name>
<Addressed>
<Address> </Address>
<Address> </Address>
<Address> </Address>
<Addressed>

How can i create this XML ????
Will "OutputRoot.XML.Addressed.Address" used thrice not create an error ??

How can i read from such an XML ????
Will "InputBody.Addressed.Address" not give me an error ??
Back to top
View user's profile Send private message Send e-mail
martinrydman
PostPosted: Sun Nov 28, 2004 2:25 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Hi,

Use

Code:

OutputRoot.XML.Addressed.Address[1]
OutputRoot.XML.Addressed.Address[2]
OutputRoot.XML.Addressed.Address[3]


Good luck!

/Martin
Back to top
View user's profile Send private message
javaforvivek
PostPosted: Sun Nov 28, 2004 10:07 pm    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

Frist of all, your XML message should have a root element.
You can define it as :
<Person>
<Name>
<First> </First>
<Last> </Last>
</Name>
<Addressed>
<Address> </Address>
<Address> </Address>
<Address> </Address>
<Addressed>
</Person>

While defining your message, you can set Min and Max occurrences of Address element = 3 inside your Addressed Type.
Refer them as Martin has suggested. But with slightly different code as:
Quote:

How can i read from such an XML ????


You can refer them as:
Code:

InputRoot.XML.Person.Addressed.Address[1]
InputRoot.XML.Person.Addressed.Address[2]
InputRoot.XML.Person.Addressed.Address[3]


Quote:

Will "InputBody.Addressed.Address" not give me an error ??


Again you gotta change it to "InputRoot.XML.Person.Addressed.Address"
This will not give you error, but it will refer to first occurrence of Address element inside your Addressed element, i.e, it is same as
InputRoot.XML.Person.Addressed.Address[1].
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help required !!!
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.