cancel
Showing results for 
Search instead for 
Did you mean: 

XML Output

Former Member
0 Kudos

How would we extract the values from an XML output if we didn't know the column names? For example, my XML output looks like this -

- <Rowset>

- <Columns>

<Column Description="DateTime" MaxRange="0" MinRange="0" Name="DateTime" SQLDataType="93" SourceColumn="DateTime" />

<Column Description="MII Will Write to This Tag" MaxRange="0" MinRange="0" Name="Channel_4.SI.SI30500_kep.message" SQLDataType="12" SourceColumn="Channel_4.SI.SI30500_kep.message" />

</Columns>

- <Row>

<DateTime>2009-12-10T14:12:56</DateTime>

<Channel_4.SI.SI30500_kep.message>String 40</Channel_4.SI.SI30500_kep.message>

</Row>

I need to extract the value of 'Channel_4.SI.SI30500_kep.message' tag.

Can I do it with something like /Rowset/Row/Column2?

Regards,

Chanti.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Chanti,

solution is

{/Rowsets/Rowset/Row/*[X]}

x = is the column number.

BR

Pedro Iglesias

Former Member
0 Kudos

Thanks Pedro. It worked. Can you also tell me how to extract the tag name from the given output? If its from the columns thats fine too.

Former Member
0 Kudos

Chanti,

for get the name of the element use this:

{name(/Rowsets/Rowset/Row/*[X])}

x = is the column number.

BR

Pedro Iglesias

Answers (0)