Help to parse xml

asked 2018-04-18 07:59:55 -0500

juju gravatar image


I am looking for help to parse the xml below in streamsets. The structure of the xml is throwing me off a bit. The cname nodes are column headers, with the corresponding r and c nodes providing the vlaue for each row of the data. Also, each row has a timestamp that is calculated based on the variables in the data node. I havevent been able to figure out how to parse this to asign the row data to the column headers and also create the datestamp column for each row. Thanks

<group serial="0x757c6ce4">
    <data columns="13" time_stamp="0x582e5290" time_delta="3600" epoch="0x58110bb8">
    <cname t="P">Grid</cname>
    <cname t="S">Grid*</cname>
    <cname t="P">Gen Set</cname>
    <cname t="S">Gen Set*</cname>
    <cname t="I">I CT1</cname>
    <cname t="I">I CT2</cname>
    <cname t="I">I CT3</cname>
    <cname t="I">I CT4</cname>
    <cname t="I">I CT5</cname>
    <cname t="I">I CT6</cname>
    <cname t="V">V L1</cname>
    <cname t="V">V L2</cname>
    <cname t="V">V L3</cname>
edit retag flag offensive close merge delete