cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
matthew5
Level II

Importing XML directly to data tables

Hello,

I want to import a data set from (well formed) XML directly into a data table. This is something that Excel can do so I'm sure JMP can! The XML and the final data tables look like the examples below; there are a set of tests with results for individual pins, associated with a die, all part of an overall lot, with associated attributes such as tester or x,y coordinates (it's based on semiconductor test data, as you may have guessed!). The dataset could potentially be very long.

I know there is a Parse XML JSL function but I can't get my head around how to implement it in this situation. Any suggestions gratefully received!

Thanks, Matthew.

<FinalTest>

  <Lot lot_id="BLAH" tester_type="J750">

    <Die die_id="1" die_x="1" die_y="1">

      <Test test_name="TEST1" unit="A">

        <Pin pin_name="ABC" result="1234" />

        <Pin pin_name="DEF" result="2345" />

      </Test>

      <Test test_name="TEST2" unit="A">

        <Pin pin_name="XCV" result="414" />

        <Pin pin_name="VBN" result="1351" />

      </Test>

    </Die>

    <Die die_id="2" die_x="3" die_y="4">

      <Test test_name="TEST1" unit="A">

        <Pin pin_name="ABC" result="5433" />

        <Pin pin_name="DEF" result="4321" />

  </Test>

      <Test test_name="TEST2" unit="A">

        <Pin pin_name="XCV" result="6856" />

        <Pin pin_name="VBN" result="5345" />

      </Test>

  </Die>

  </Lot>

</FinalTest>

        

lot_idtester_typedie_iddie_xdie_ytest_nameunitpin_nameresult
BLAHJ750111TEST1AABC1234
BLAHJ750111TEST1ADEF2345
BLAHJ750111TEST2AXCV414
BLAHJ750111TEST2AVBN1351
BLAHJ750234TEST1AABC5433
BLAHJ750234TEST1ADEF4321
BLAHJ750234TEST2AXCV6856
BLAHJ750234TEST2AVBN5345
10 REPLIES 10
archu
Level I

Re: Importing XML directly to data tables

Hi I got an error when i wrote this

Parse XML ( QasFile,

On Element("IndicatorGroups",

 

Start Tag (

dt = New table("TestJMPTable");

dt << New column ("N", Numeric);

dt << New column ("GraphicsFile",Character);

dt << New column("Description", Character) ;

));

row = 1;

on Element ("N",

 

Starttag(

if(row>0,dt<< Addrows(1));

Column(dt,"N")[row()] = XML Attr("N");

)),

 

EndTag()

);