>From the XmlObject and generated interfaces level there isn't a straight
forward way to alter the elements in the any buckets, there is just read
access through selectElements/selectAttributes.
But using the lower interfaces XmlCursor or DOM, elements and attributes
can be added, removed or modified, in the right place.

For your example all the child elements are in the 'any' bucket, but for
more complex content models partial validation might be needed to find
the right place.

Cezar

> -----Original Message-----
> From: P. Michael Hutchins [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 12, 2005 2:42 PM
> To: [email protected]
> Subject: Sequence of <any>, Writing
> 
> (no allegation of lack of stupidity herein ;-)
> 
> When one specifies in a schema a sequence of element, xmlbeans makes
the
> expected .add...() method..
> (at least if the min- & max- -Occurs is specified)
> 
> ..but for a sequence of <any>, there's no such method available.
> 
> 
> Searching your site, I found some mumbling stating realization that
> xmlbeans doesn't ... what? support? ... <any> (, etc.).
> (which original statement, I did not find)
> 
> I wasn't able to find anything on [sequence of <any>], so I ask:
> 
> What's the best way to create a(n XML instance document containing a)
> sequence of <any> elements?
> (given that one is using the classes that scomp produced from the XSD)
> 
> eg:
> 
> for an XSD containing:
> 
>    <xs:complexType name="foo">
>      <xs:sequence minOccurs="1" maxOccurs="232">
>        <xs:any processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
>      </xs:sequence>
>      <xs:attribute name="priority" type="xs:string"
> use="optional">    </xs:attribute>
>    </xs:complexType>
> 
> , once one has a foo object in his hand, how's best to ~.add()~
whatever
> ... elements(?) ... one has?
> (suppose I have more than one such thingy I want to put in where the
> xs:any is)
> 
> 
> Thanks,
> 
>    -- M.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to