You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by "Wim Lambrecht (Schaubroeck)" <wi...@schaubroeck.be> on 2005/03/02 13:22:01 UTC
xs:any & get/set
Hi,
Any news on the use of xs:any in xmlbeans ? I mean, i want to get/set an
'any' in my TestDocument (xsd, see below), but Xmlbeans does not supply
a setAny(...) of some sort on my generated class.
P.S. i've read the previous discussion on that issue, but it seems it
hasn't been resolved yet (maybe in V2 ?).
tia !
-wil-
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://test.be/anytest/0100"
xmlns="http://test.be/anytest/0100" elementFormDefault="qualified">
<xs:element name="test">
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="xs:string"/>
<xs:any/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: xs:any & get/set
Posted by Jorg Heymans <jh...@domek.be>.
> so presumably for elements you could do
> XmlObject[] anyChildren =
> MyEl.selectChildren(MyEl.type.qnameSetForWildcardAttributes());
^^^^^^^^^^^^^^^^^^^^^^^
This should be type.qnameSetForWildcardElements() ofcourse :)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: xs:any & get/set
Posted by Jorg Heymans <jh...@domek.be>.
Wim Lambrecht (Schaubroeck) wrote:
> Hi,
>
> Any news on the use of xs:any in xmlbeans ? I mean, i want to get/set an
> 'any' in my TestDocument (xsd, see below), but Xmlbeans does not supply
> a setAny(...) of some sort on my generated class.
>
> P.S. i've read the previous discussion on that issue, but it seems it
> hasn't been resolved yet (maybe in V2 ?).
Did you read
http://wiki.apache.org/xmlbeans/SelectChildrenAndAttributesFeature ? It
has a few helpful examples.
(in V2) i get the any attributes via
XmlObject[] anyAttributes =
MyEl.selectAttributes(MyEl.type.qnameSetForWildcardAttributes());
so presumably for elements you could do
XmlObject[] anyChildren =
MyEl.selectChildren(MyEl.type.qnameSetForWildcardAttributes());
I am not sure if this works in V1 though.
HTH
Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org