Hi Matt,
JMP currently does not have a direct way to import XML files using the File open dialog.
However, you could use the JSL to accomplish this task.
See below for an example of one way to do this.
Perhaps someone else can simplify the script to be more concise.
Cheers,
Stan
// assign xml text
xmlTxtFile = "\[
<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> ]\"
;
// Parse the XML
Parse XML( xmlTxtFile,
// Create a new table
On Element( "FinalTest",
StartTag(
dt = New Table( "Wafer Table",
// Create new columns
New Column ( "Lot ID", Character),
New Column ( "Tester Type", Character),
New Column ( "Die ID", Numeric),
New Column ( "Die X", Numeric),
New Column ( "Die Y", Numeric),
New Column ( "Test Name", Character),
New Column ( "Unit Name", Character),
New Column ( "Pin Name", Character),
New Column ( "Pin Result", Numeric),
);
row=1;
) // End Start Tag, FinalTest On Element
),
// Get next element
On Element( "Lot",
StartTag(
If(row>0, dt<< Add Rows(1));
column(dt, "Lot ID")[row()] = XML Attr( "lot_id" );
column(dt, "Tester Type")[row()] = XML Attr( "tester_type" );
),
EndTag()
),
On Element( "Die",
StartTag(
column(dt, "Die ID")[row()] = Num(XML Attr( "die_id" ));
column(dt, "Die X")[row()] = Num(XML Attr( "die_x" ));
column(dt, "Die Y")[row()] = Num(XML Attr( "die_y" ));
)
),
On Element( "Test",
StartTag(
column(dt, "Test Name")[row()] = XML Attr( "test_name" );
column(dt, "Unit Name")[row()] = XML Attr( "unit" );
)
),
On Element( "Pin",
StartTag(
column(dt, "Pin Name")[row()] = XML Attr( "pin_name" );
column(dt, "Pin Result")[row()] = Num(XML Attr( "result" ));
),
EndTag(
If(row>0, dt<< Add Rows(1));
)
)
);
// delete extra row
nr = NRow(dt);
dt << Go To Row(nr);
dt<<Get Selected();
dt<<Delete Rows;
// Fill down missing row values
For Each Row(
cr = row();
If( cr != 1 ,
If(:Lot ID == "", :Lot ID = Lag( :Lot ID, 1 ), :Lot ID = :Lot ID );
If(:Tester Type == "", :Tester Type = Lag( :Tester Type, 1 ), :Tester Type = :Tester Type );
If(IsMissing(:Die ID) == 1, :Die ID = Lag( :Die ID, 1 ), :Die ID = :Die ID );
If(IsMissing(:Die X) == 1,:Die X = Lag( :Die X, 1 ), :Die X = :Die X ) ;
If(IsMissing(:Die Y) == 1, :Die Y = Lag( :Die Y, 1 ), :Die Y = :Die Y );
If(:Test Name == "", :Test Name = Lag( :Test Name, 1 ), :Test Name = :Test Name );
If(:Unit Name == "", :Unit Name = Lag( :Unit Name, 1 ), :Unit Name = :Unit Name );
);
);