We are trying to parse an xml file into tabular form for database update.
The job looks similar to this:
a sequential file -->xml input --> tranformer stage-->sequential file
The xml source is written below. We are having problems with handling multiple languages in the nested tags(Languages).
<?xml version="1.0" encoding="UTF-8"?>
<OfficeLanguages xmlns:pi="http://was.vsp.com/enetwork_web/xml/">
<OLang>
<TXNID>PI18710258:47199993</TXNID>
<OldTax>204999999</OldTax>
<OldHash>991</OldHash>
<OldSeq>2</OldSeq>
<NewTax>20499999</NewTax>
<NewHash>931</NewHash>
<NewSeq>2</NewSeq>
<Active>A</Active>
<Languages>
<Language>Filipino</Language>
<Language>Spanish</Language>
</Languages></OLang>
</OfficeLanguages>
The input stage is able to read all the tags except the language tags within the Languages tag.
Thank you for your time.
datastage xml parsing
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 87
- Joined: Mon Feb 18, 2008 3:58 pm
- Location: Sacramento, CA
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
You canot parse the Language tag? Then your Xpath to the Language element has a typo or other fundamental problem. If you are getting a single language when you expect a row per Language then your Repeating element is probably mis-defined. Is the Repeating Element set to the Language element so that the row breaks when the Language changes?
-
- Premium Member
- Posts: 87
- Joined: Mon Feb 18, 2008 3:58 pm
- Location: Sacramento, CA
xml parsing
yes thank you. I figured it out. The repeating element was misdefined. You were right.throbinson wrote:You canot parse the Language tag? Then your Xpath to the Language element has a typo or other fundamental problem. If you are getting a single language when you expect a row per Language then your Repeating element is probably mis-defined. Is the Repeating Element set to the Language element so that the row breaks when the Language changes?
Re: datastage xml parsing
Is there a possibility to create the Job XML outside Data Stage. We are trying to create and automation tool which can generate popular mappings outside data stage. This will reduce the effort of creating multiple mappings of similar nature?