commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenneth Petersen <>
Subject Customizing JXPath. Custom Containers.
Date Wed, 09 Oct 2002 09:50:07 GMT

I am using Castor for creating java objects capable of containing data
conforming to certain xsd-schemas. When using Castor to create a java
structure capable of containing data of xml entities following schema:

	<xs:element name="Request">
					<xs:element name="Success"
					<xs:element name="Errors"

Castor creates a "Request" class containing a "RequestChoice" container
containing either a "Success" or "Errors" object.

I would like to use JXPath to access the data of the java objects using
X-Path expressions identifying values of the original xml-entity. Taking the
example from before, I would like to use expression "/Request/Errors" to
access the "Errors" children of an xml-entity. I am not capable of doing
this without being able to configure JXPath so that properties of classes
"Xxx" following the naming pattern "XxxChoice" are identifies as being
containers. Is this at all possible? If so some clues as to how this is
accomplished would be much appreciated.

Best Regards
Kenneth Petersen

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message