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 :)
>
>
> <[email protected]>