In XMLBeans you would do
newCursor().setTextValue(...) to set the content of the element.
Radu
On Mon, 2008-03-10 at 20:39 -0400, Alessandro Ferrucci wrote:
> For example JAXB generates the following class:
>
> public class FilterRequestType {
>
> @XmlValue
> protected String content;
> @XmlAttribute
> protected BigInteger bid;
> @XmlAttribute
> protected String category;
> @XmlAttribute
> protected String country;
> @XmlAttribute(required = true)
> protected String product;
> @XmlAttribute(name = "response_type")
> protected ResponseTypes responseType;
> @XmlAttribute(name = "validate_phone")
> protected Boolean validatePhone;
> @XmlAttribute(name = "validate_zip")
> protected Boolean validateZip;
>
> And so in this case I would do setContent(...) to set the value... I
> need to do the equivalent in XmlBeans.
>
> thanks
>
> Alessandro Ferrucci :)
>
> On Mon, Mar 10, 2008 at 8:34 PM, Alessandro Ferrucci
> <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have the following XSD snippet:
>
> <xs:element name="ProfanityFilterRequest"
> type="FilterRequestType" />
> <xs:complexType name="FilterRequestType" mixed="true">
> <xs:attribute name="response_type"
> type="responseTypes"
> use="optional" />
> <xs:attribute name="validate_phone" type="xs:boolean"
> use="optional" />
> <xs:attribute name="validate_zip" type="xs:boolean"
> use="optional" />
> <xs:attribute name="bid" type="xs:integer"
> use="optional" />
> <xs:attribute name="country" type="xs:string"
> use="optional" />
> <xs:attribute name="product" type="xs:string"
> use="required" />
> <xs:attribute name="category" type="xs:string"
> use="optional" />
> </xs:complexType>
>
> Now I want to create an object of FilterRequestType and set
> its attributes and VALUE so that I get somethign like
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ProfanityFilterRequest response_type="text" bid="1" country="US">
> foo foo bar</ProfanityFilterRequest>
>
>
>
> The class that XmlBeans generates has all the necessary getters and
> setters for the attributes, but none for the *VALUE*, how do I go about
> setting "foo foo bar" for this Xml object?
>
> Thanks
>
> alessandro ferrucci :)
>
>
>
>
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or legally
privileged, and is intended solely for the use of the individual or entity
named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete
it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]