Help in Processing XML File

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Help in Processing XML File

Post by mac4rfree85 »

Hi Guys,

I need to Read XML file and put it to different Columns.

My I/P is

Code: Select all

<?xml version=""1.0"" encoding=""UTF-8"" standalone=""no""?>
<pricing-model>
  <qualifier>
    <next>
      <collection-name>items</collection-name>
      <element-name>item</element-name>
      <element-quantity-property>quantity</element-quantity-property>
    </next>
  </qualifier>
</pricing-model>
I am reading it as single column and passing it to XML Reader Stage. I have defined 6 columns. Following are the derivation i have given

Code: Select all

/pricing-model/qualifier/next/collection-name/text()
/pricing-model/qualifier/next/element-name/text()
/pricing-model/qualifier/next/element-quantity-property/text()
/pricing-model/qualifier/next/equals/value/text()
/pricing-model/qualifier/next/equals/constant/data-type/text()
/pricing-model/qualifier/next/equals/constant/string-value/text()

The records are reaching XML Reader and no output is coming from the REader stage.
Can somebody help me out.

Cheers!!!!!
Mac4rfree
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Re: Help in Processing XML File

Post by mac4rfree85 »

Sorry guys, the issue was with the XML.
The input was not a valid file.
Now i am able to parse it..
Mac4rfree
Post Reply