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 » what is the best practice to parse a XML

Post new topic  Reply to topic
 what is the best practice to parse a XML « View previous topic :: View next topic » 
Author Message
Ajju.
PostPosted: Tue Oct 22, 2002 1:13 pm    Post subject: what is the best practice to parse a XML Reply with quote

Voyager

Joined: 26 Jul 2002
Posts: 77

Hi,
well i am very much new to WMQI and i have an assignment to parse the xml given below and get the output in TDS format as :

SignonRq.ClientDt:20021018||SignonRq.CustLangPref:en-US||................
and so on.
ie.
element1:data||element2:data and so on.......

it will be appreciated if you can answer my following questions:

how do i begin in first place.
shud i use message sets or do it with ESQL
what is the best practice adopted in industry to do this kind of work

thanks in adv.
Ajit.


<?xml version="1.0"?>
<!DOCTYPE ACORD SYSTEM "ACORD.dtd">
<!-- -->
<ACORD>
<SignonRq>
<ClientDt>20021018</ClientDt>
<CustLangPref>en-US</CustLangPref>
<ClientApp>
<Org>OneBeacon</Org>
<Name>PLACE</Name>
<Version>1.0</Version>
</ClientApp>
</SignonRq>
<InsuranceSvcRq>
<RqUID/>
<contact admin>
<RqUID/>
<TransactionRequestDt>20021018</TransactionRequestDt>
<TransactionEffectiveDt>20021018</TransactionEffectiveDt>
<CurCd>USD</CurCd>
<Producer>
<ProducerInfo>
<ContractNumber>0611292</ContractNumber>
<ProducerSubCode>00</ProducerSubCode>
</ProducerInfo>
</Producer>
<InsuredOrPrincipal>
<GeneralPartyInfo>
<NameInfo>
<PersonName>
<Surname>Yao</Surname>
<GivenName>Irene</GivenName>
<OtherGivenName/>
</PersonName>
</NameInfo>
<Addr>
<AddrTypeCd>MailingAddress</AddrTypeCd>
<Addr1>123 Main Street</Addr1>
<City>East Haven</City>
<StateProvCd>CT</StateProvCd>
<PostalCode>06512</PostalCode>
</Addr>
</GeneralPartyInfo>
Back to top
View user's profile Send private message
lung
PostPosted: Tue Oct 22, 2002 5:18 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

You have to use your message set. Add a TDS layer to it and define all your elements. Then, create your message type (also in the message set).

To convert the message, you need to use a compute node and an RCD node.

Also read up on those .pdf files IBM supplied
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Ajju.
PostPosted: Wed Oct 23, 2002 4:49 am    Post subject: Reply with quote

Voyager

Joined: 26 Jul 2002
Posts: 77

Thanks Lung,
Well i thought in the same way, but u might have noticed that my XML is too large that is around 300 elements. so shud i have to manually add each elements.
is there any way by which i can import all the XML in one go and just create TYPEs.
also is there any performance issue for using WMQI2.1 message sets.

Thanks,
Ajit.
Back to top
View user's profile Send private message
JLRowe
PostPosted: Wed Oct 23, 2002 6:33 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

You can import a DTD directly or a schema using a support pack. If you don't have either, there are programs that can generate a DTD or schema from XML.
Back to top
View user's profile Send private message Send e-mail
Ajju.
PostPosted: Wed Oct 23, 2002 7:04 am    Post subject: Reply with quote

Voyager

Joined: 26 Jul 2002
Posts: 77

Thanks jlrowe,

I tried to import a DTD in message set but it got hanged and i need to restart my control center.

i tried with a small dtd for test purpose but after that i did not know how to move fwd.
is there any step to step configuration document on this.
pl. let me know.


Thanks,
Ajit
Back to top
View user's profile Send private message
Lisa
PostPosted: Wed Oct 23, 2002 8:55 am    Post subject: XML Reply with quote

Master

Joined: 07 Jun 2002
Posts: 287
Location: NJ

Read WMQI Working With Message manual.

This should help!

Lisa
Back to top
View user's profile Send private message Send e-mail
Ajju.
PostPosted: Wed Oct 23, 2002 11:59 am    Post subject: Reply with quote

Voyager

Joined: 26 Jul 2002
Posts: 77

I think that working with messages do provide good view of the messages, but is there anything which will guide me for step by step configuration and programming.


Ajit.
Back to top
View user's profile Send private message
lung
PostPosted: Thu Oct 24, 2002 9:34 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

I usually just define my messages one by one in the message set. Imports usually don't allow you to manipulate the elements in it (should there be any change in the future), well, at least not 100% manipulation
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger 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 » what is the best practice to parse a XML
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.