Can you post a snippet of code? -jacobd On Tue, Feb 17, 2009 at 5:19 PM, riya <rachan...@gmail.com> wrote: > > Hi, > > I generated xsd using inst2xsd provided with xmlbeans. > > command: > inst2xsd rd Address_Valid_Request.xml > > Following is the xsd I got: > <?xml version="1.0" encoding="UTF-8"?> > <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > <xs:element name="ADDR_VALID_REQUEST" type="ADDR_VALID_REQUESTType"/> > <xs:complexType name="HEADERType"> > <xs:sequence> > <xs:element type="xs:string" name="APPLICATION_ID"/> > <xs:element type="xs:string" name="IBPASSWORD"/> > <xs:element type="xs:string" name="LANGUAGE_CD"/> > </xs:sequence> > </xs:complexType> > <xs:complexType name="ADDR_VALID_REQUESTType"> > <xs:sequence> > <xs:element type="HEADERType" name="HEADER"/> > <xs:element type="xs:int" name="DSID"/> > <xs:element type="xs:string" name="COUNTRY"/> > <xs:element type="xs:string" name="ADDRESS1"/> > <xs:element type="xs:string" name="ADDRESS2"/> > <xs:element type="xs:string" name="ADDRESS3"/> > <xs:element type="xs:string" name="ADDRESS4"/> > <xs:element type="xs:string" name="CITY"/> > <xs:element type="xs:string" name="STATE"/> > <xs:element type="xs:string" name="COUNTY"/> > <xs:element type="xs:int" name="POSTAL"/> > </xs:sequence> > </xs:complexType> > </xs:schema> > > Now when I try to generate a xml based on jar generated from above xsd, I > get following: > > <xml-fragment> > <HEADER> > <APPLICATION_ID>USER</APPLICATION_ID> > <IBPASSWORD>xyz</IBPASSWORD> > <LANGUAGE_CD>ENG</LANGUAGE_CD> > </HEADER> > <DSID>45454545</DSID> > <COUNTRY>USA</COUNTRY> > <ADDRESS1>s</ADDRESS1> > <ADDRESS2>s</ADDRESS2> > <ADDRESS3/> > <ADDRESS4/> > <CITY>s</CITY> > <STATE>CA</STATE> > <COUNTY/> > <POSTAL>95014</POSTAL> > </xml-fragment> > > The xml as you can see is mostly fine, except for the top node which is > </xml-fragment>. > > Can some one please tell me how to correct this? > > Thanks in advance! > riya > -- > View this message in context: > http://www.nabble.com/%3Cxml-fragment%3E-Issues-tp22070264p22070264.html > Sent from the Xml Beans - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > For additional commands, e-mail: user-h...@xmlbeans.apache.org > >
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: user-h...@xmlbeans.apache.org