XMLリテラル

e4x_example.jsを参考にして。xbean.jar、jsr173_api.jarが必要。
便利かな?


#!/usr/bin/env rhino
var order = <order>
<customer>
<firstname>John</firstname>
<lastname>Doe</lastname>
</customer>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
</order>

print(order);

order.customer.firstname = "MooMoo"

print(order);