Author |
Message
|
Ajju. |
Posted: Tue Oct 22, 2002 1:13 pm Post subject: what is the best practice to parse a XML |
|
|
 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 |
|
 |
lung |
Posted: Tue Oct 22, 2002 5:18 pm Post subject: |
|
|
 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 |
|
 |
Ajju. |
Posted: Wed Oct 23, 2002 4:49 am Post subject: |
|
|
 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 |
|
 |
JLRowe |
Posted: Wed Oct 23, 2002 6:33 am Post subject: |
|
|
 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 |
|
 |
Ajju. |
Posted: Wed Oct 23, 2002 7:04 am Post subject: |
|
|
 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 |
|
 |
Lisa |
Posted: Wed Oct 23, 2002 8:55 am Post subject: XML |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
Read WMQI Working With Message manual.
This should help!
Lisa |
|
Back to top |
|
 |
Ajju. |
Posted: Wed Oct 23, 2002 11:59 am Post subject: |
|
|
 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 |
|
 |
lung |
Posted: Thu Oct 24, 2002 9:34 pm Post subject: |
|
|
 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 |
|
 |
|