1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Missing position for node SCRIPT[0:0]:EXPR_RESULT[33:0]:CALL[33:0]:GET_REF[33:15]:REF_MEMBER[0:0]
Missing position for node SCRIPT[0:0]:EXPR_RESULT[33:0]:CALL[33:0]:GET_REF[33:15]:REF_MEMBER[0:0]:STRING[0:0]
<SCRIPT>// From http://www.w3schools.com/e4x/e4x_example.asp
<VAR>var <NAME>order = <NEW>new <NAME>XML</NAME>()</NEW></NAME></VAR>
<EXPR_RESULT><SETNAME><BINDNAME>order</BINDNAME>=<E4X><STRING><order id="555">
<date>2005-08-01</date>
<customer>
<firstname>John</firstname>
<lastname>Johnson</lastname>
</customer>
<item>
<name>Maxilaku</name>
<qty>5</qty>
<price>155.00</price>
</item>
</order></STRING></E4X></SETNAME></EXPR_RESULT>
// Calculate the price:
<VAR>var <NAME>total=<MUL><GETPROP><NAME>order</NAME>.<GETPROP><STRING>item</STRING></GETPROP>.<STRING>qty</STRING></GETPROP> * <GETPROP><NAME>order</NAME>.<GETPROP><STRING>item</STRING></GETPROP>.<STRING>price</STRING></GETPROP></MUL></NAME></VAR>
//Display the customers full name:
<EXPR_RESULT><CALL><NAME>document</NAME>.<GETPROP><STRING>write</STRING></GETPROP>(<GETPROP><NAME>order</NAME>.<GETPROP><STRING>customer</STRING></GETPROP>.<STRING>lastname</STRING></GETPROP>)</CALL></EXPR_RESULT>
<EXPR_RESULT><CALL><NAME>document</NAME>.<GETPROP><STRING>write</STRING></GETPROP>(<STRING>","</STRING>)</CALL></EXPR_RESULT>
<EXPR_RESULT><CALL><NAME>document</NAME>.<GETPROP><STRING>write</STRING></GETPROP>(<GETPROP><NAME>order</NAME>.<GETPROP><STRING>customer</STRING></GETPROP>.<STRING>firstname</STRING></GETPROP>)</CALL></EXPR_RESULT>
//Add a new item:
<EXPR_RESULT><SETPROP_OP><NAME><ADD><USE_STACK/>order</NAME>.<STRING>item</STRING>+=
<E4X><STRING><item>
<name>Pavlova</name>
<qty>10</qty>
<price>128.00</price>
</item></STRING></E4X></ADD></SETPROP_OP></EXPR_RESULT>
//Display the order id:
<EXPR_RESULT><CALL><NAME>document</NAME>.<GETPROP><STRING>write</STRING></GETPROP>(<GET_REF><NAME>order</NAME>.@id</GET_REF>)</CALL></EXPR_RESULT></SCRIPT>
|