Hi. Got an esoteric problem. I'm getting confident with JSL and need to build a custom importer for a strangely formatted XML file. I'm concerned that the JSL parser does not work on my formatting, as it is different from every example file I've found.
XML examples are formatted like:
<Worksheet ss:Name="Bigclass">
<Table ss:ExpandedColumnCount="5" ss:ExpandedRowCount="41" x:FullColumns="1"
x:FullRows="1">
<Row>
<Cell><Data ss:Type="String">name</Data></Cell>
<Cell><Data ss:Type="String">age</Data></Cell>
...
While mine looks like:
<LOT_REPORT_TRX>
<LOT_REPORT>
<LOT_NUMBER>04Y054F</LOT_NUMBER>
<PART_NUMBER />
<PART_DESCRIPTION />
<CUSTOMER_PART_NUMBER>71538-01</CUSTOMER_PART_NUMBER>
Note that the data is stored between angled brackets, not inside the angled brackets. My testing code is as follows
xmlStr = Load Text File( My testing data above :) );
nt = New Table(
"Testing Table",
New Column("Lot Number", Character),
New Column("PUID", Character)
);
iRow=0;
Parse XML(
xmlStr,
On Element(
"LOT_REPORT_TRX",
Start Tag(
nt << add row(1);
iRow++;
)
),
On Element(
"LOT_REPORT",
Start Tag(
nt:Lot Number[iRow] = XML Attr( "LOT_NUMBER" );
)
),
);But it returns only blank cells, and I can't figure out why. For now I'm just trying to pull out any data at all, so the code only covers one element. Any thoughts or documentation suggestions?