Hi Everyone,
I have been stuck on this XML parsing data to JSL for awhile, I can do it at one level but not at 2 levels.
I have this XML as below:
XXX" value="-11.9" />
YYY" value="7.1" />
XXX" value="-1.9" />
YYY" value="4.1" />
I need the output table to look like this one:
AAA_XXX | AAA_YYY | BBB_XXX | BBB_YYY |
-11.9 | 7.1 | -1.9 | 4.1 |
So far, I have this JSL code but it can only do IF condition at 1 level, but not at 2 levels for Menu and Item.
On Element( "Item",
Starttag(
If( XML Attr( "name") == "XXX",
column( dt, "AAA_XXX")[row()] = Num( XML Attr( "value"))/10;
);
If( XML Attr( "name") == "YYY",
column( dt, "AAA_YYY")[row()] = Num( XML Attr( "value"))/10;
);
If( XML Attr( "name") == "XXX",
column( dt, "BBB_XXX")[row()] = Num( XML Attr( "value"))/10;
);
If( XML Attr( "name") == "YYY",
column( dt, "BBB_YYY")[row()] = Num( XML Attr( "value"))/10;
);
)Can you please kindly help me out?
Thank you.
I would most likely start by trying the interactive XML import wizard


From here you can clean the data and modify it if needed and then you can split it

JMP is able to record most of the steps you need to get here (check enhanced log and source scripts of tables)