All,
This is in connection to a different question on the forum (https://community.jmp.com/t5/Discussions/Can-JMP-Support-Excel-Formatting-through-JSL/m-p/86355#M38495) . I am providing a small subset of a really large XML file ( XML of a worksheet in Excel). I would like to see a good example on how to traverse the XML tree to get to a targeted element efficiently. Can someone provide a good example on what is the best way to use the Parse XML or a different function in JSL to get a handle to the value here and edit the value ?
<c r="A1" s="67" t="s">
<v>0</v>
</c>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac"
xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<dimension ref="A1:BB101473" />
<sheetViews>
<sheetView showGridLines="0" tabSelected="1" zoomScaleNormal="100" workbookViewId="0">
<selection activeCell="A13" sqref="A13" />
</sheetView>
</sheetViews>
<sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25" />
<cols>
<col min="1" max="1" bestFit="1" width="27.5703125" customWidth="1"/>
<col min="2" max="2" width="5.140625" customWidth="1"/>
<col min="3" max="3" width="5.140625" customWidth="1"/>
<col min="4" max="4" width="5.140625" customWidth="1"/>
<col min="5" max="5" width="5.140625" customWidth="1"/>
<col min="6" max="6" width="5.140625" customWidth="1"/>
<col min="7" max="7" width="5.140625" customWidth="1"/>
<col min="8" max="8" width="5.140625" customWidth="1"/>
<col min="9" max="9" width="5.140625" customWidth="1"/>
<col min="10" max="10" width="6.5703125" customWidth="1"/>
<col min="11" max="11" width="5.140625" customWidth="1"/>
<col min="12" max="12" width="5.140625" customWidth="1"/>
<col min="13" max="13" width="5.140625" customWidth="1"/>
<col min="14" max="14" width="2.85546875" customWidth="1"/>
<col min="15" max="15" bestFit="1" width="22" customWidth="1"/>
<col min="16" max="16" width="15.85546875" customWidth="1"/>
<col min="17" max="17" width="5.140625" customWidth="1"/>
<col min="18" max="18" width="33" customWidth="1" style="43"/>
<col min="19" max="19" width="14.42578125" customWidth="1" style="43"/>
<col min="20" max="20" width="15.85546875" customWidth="1" style="43"/>
<col min="21" max="22" width="15.85546875" customWidth="1" style="44"/>
</cols>
<sheetData>
<row r="1" ht="24">
<c r="A1" s="67" t="s">
<v>0</v>
</c>
<c r="B1" s="67"/>
<c r="C1" s="67"/>
<c r="D1" s="67"/>
<c r="E1" s="67"/>
<c r="F1" s="67"/>
<c r="G1" s="67"/>
<c r="H1" s="67"/>
<c r="I1" s="67"/>
<c r="J1" s="67"/>
<c r="K1" s="67"/>
<c r="L1" s="67"/>
<c r="M1" s="67"/>
<c r="N1" s="10"/>
<c r="O1" s="4"/>
<c r="P1" s="4"/>
<c r="Q1" s="4"/>
<c r="R1" s="27"/>
<c r="S1" s="27"/>
<c r="T1" s="27"/>
</row>
</sheetData>
</worksheet> I tried the following and got an empty table:
Parse XML(xml,
On Element("sheetData",Start Tag(New Table())),
On Element( "col", End Tag( New Column( XML Attr( "row r = '1' ht ='24'" ), Set Values( Parse( XML Text() ) ) ) ) )
);