If I have the following schema fragment:

<xsd:complexType name="addressBookContact">
 <xsd:sequence>
  <xsd:element name="firstName" type="xsd:string" nillable="true" />
  <xsd:element name="lastName" type="xsd:string" nillable="true" />
  <xsd:element name="email" type="xsd:string" />
 </xsd:sequence>
</xsd:complexType>

and do the following in my Java code:

String firstName = "";
contact.setFirstName(firstName);

The resulting XML is <firstName/>. 

This is fine except org.json.XML converts that to firstName:{} and
<firstName></firstName> to firstName:"". Not sure if that's correct or
not but the easiest fix for me is to have xmlbeans convert a blank
string to <element></element>. 

Is there some way to do this?

Thanks,


-- 
Jason Bodnar
jbod...@convio.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Reply via email to