Sorry about Yet-Another-Any question, but this is my first expedition in
Xmlbeans and I have seached the documentation and Javadocs and I'm still
banging my head against a brick wall.

Suppose I have a schema with an element, 'myElem', say. One of the child
elements, 'myChild', is defined as:

    <xs:element name="myChild" type="MyChildType" minOccurs="0" />
    <xs:complexType name="MyChildType">
        <xs:sequence>
              <xs:any namespace="##any" processContents="lax"
maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

I can get at MyChild by:

    MyChildType myChild = myElem.getMyChild();

But, and you all know what's coming, how do I get the object that is
*actually* being carried in the place of the Any? I have tried using
XmlCursors to navigate to the object, but I really don't want to have to
disassemble the XmlObject, what I really want is to get back to the cosy
world of gets and sets on the concrete objects.

So, if I had a xml fragement that looked like:

    <myElem>
        <daughter>britney spears</daughter>
    </myElem>

What is the cleanest way of extracting the XmlObject and creating the
associated 'daughter' xmlbean so that I can go back to :

        daughter.getAge();

Assume that 'daughter' is the only element type that I'm prepared to
accept and that other elements will be rejected by the surrounding
application as 'not supported'.

Thanks for any help.

Cheers, Des

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to