XML format on input
Posted: Wed Jun 18, 2008 2:23 pm
Dealing with xml, I've found that there can be attributes and elements inside a well-formed xml file.
Well, this is what I came across. Another application wanted to send me an xml file in the following format:
<Rows>
<Row Field='ColumnName1'>10</Row>
<Row Field='ColumnName2'>Bob</Row>
<Row Field='ColumnName3'>7/4/1776</Row>
</Rows>
This is just a sample of one repetitive record within a table, where ColumnName1 is the column name and 10 is the data within that column.
We can read it using the xml stage and handle this, but is the only way inside of DataStage to handle this is to basically pivot the data?
Anyone else seen this type of formatted xml and found another solution? My solution: I'm going back to the source and requesting the following:
<Rows>
<ColumnName1>10</ColumnName1>
<ColumnName2>Bob</ColumnName2>
<ColumnName3>7/4/1776</ColumnName3>
</Rows>
Thanks for your response.
Jason
Well, this is what I came across. Another application wanted to send me an xml file in the following format:
<Rows>
<Row Field='ColumnName1'>10</Row>
<Row Field='ColumnName2'>Bob</Row>
<Row Field='ColumnName3'>7/4/1776</Row>
</Rows>
This is just a sample of one repetitive record within a table, where ColumnName1 is the column name and 10 is the data within that column.
We can read it using the xml stage and handle this, but is the only way inside of DataStage to handle this is to basically pivot the data?
Anyone else seen this type of formatted xml and found another solution? My solution: I'm going back to the source and requesting the following:
<Rows>
<ColumnName1>10</ColumnName1>
<ColumnName2>Bob</ColumnName2>
<ColumnName3>7/4/1776</ColumnName3>
</Rows>
Thanks for your response.
Jason