This only works as expected if I remove the hyphen from the
reservation-request:
var baseDocument =
<create-reservation-request>
<reservation-request>
<product><id>XXX</id></product>
</reservation-request>
</create-reservation-request>
print(baseDocument.reservation-request.product[0]);
With the hyphen, I get this:
script error in file createReservation.js :
org.mozilla.javascript.EcmaError: ReferenceError: "request" is not
defined.
I think the interpreter is trying to subtract request from
reservation. Is this a bug in rhino (using 1_7R1), or am I not
supposed to have hyphens in my tags?
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino