parses an XML expression using the On Element() expression for specified XML tags.
value = XML Attr( "attribute name" );
extracts the string value of an XML argument when evaluating a Parse XML() expression.
extracts the string text of the body of an XML tag when evaluating a Parse XML() expression.
Suppose that a Microsoft Excel file contains one row of data from Big Class.jmp. The file is saved as the valid XML document BigclassExcel.xml, shown here and also saved in the JMP Samples/Import Data folder.
The following script reads BigclassExcel.xml and creates a JMP data table with the information in it. This script, named ParseXML.jsl, is in the JMP Samples/Scripts folder.
Parse XML( file contents,
sheetname = XML Attr(
dt = New Table( sheetname );
row = 1;
col = 1;
col = 1;
OnElement( "urn:schemas-microsoft-com:office:spreadsheet^Cell", EndTag( col++ ) ),
data = XML Text( collapse );
If( row == 1,
); // and other rows have data