You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Kevin Krouse <kk...@bea.com> on 2004/09/25 07:12:45 UTC
Rhino 1.6 uses xmlbeans
I just noticed that Rhino (Mozilla's JavaScript engine) has a new RC
candidate release which uses xmlbeans to do it's new native xml
handling. http://www.mozilla.org/rhino/download.html
I can tell you from experience that this is very cool stuff. xml
becomes a native type:
var customer = <customer>
<name>Bob</name>
<pet type="dog">Rover</pet>
<pet type="cat">Socks</pet>
</customer>;
// returns 'xml'
print(typeof customer);
// set the value inside <name>
customer.name = "Sally";
// change Rover's species
customer.pet.@type = "Iguana";
// get all pets that are 'cat' or 'dog'
var y = customer.pet.(@type == "cat" || @type == "dog")
There's lots more interesting examples:
http://lxr.mozilla.org/mozilla/source/js/rhino/examples/E4X/e4x_example.
js
I'm not sure how or if the Rhino can use any of the compiled schemas
other than just as a Java class.
--k
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org