Hi all, I have a simiple question. I have the following schema ============== <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <!-- <xs:simpleType name="SLType"> <xs:restriction base="xs:string"> <xs:maxLength value="255"/> <xs:minLength value="0"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="upType"> <xs:restriction base="xs:string"> <xs:enumeration value="update"/> </xs:restriction> </xs:simpleType> <xs:element name="Root"> <xs:annotation> <xs:documentation>Comment describing your root element</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="location" minOccurs="0"> <xs:complexType> <xs:simpleContent> <xs:extension base="SLType"> <xs:attribute name="modifier" type="upType"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:schema> ===============
Using xmlBeans (scomp) i generated the jar file. With the following sample xml file i am trying to get the value <?xml version="1.0" encoding="UTF-8"?> <Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\temp\testschema\testschema.xsd"> <location modifier="update">Gaithersburg</location> </Root> How can i access the value "Gaithersburg". Code snippet is as follows RootDocument rtd = RootDocument.Factory.parse(xmlstring); Root rt = rtd.getRoot(); Location lo = rt.getLocation(); In the Location i am not getting the values. Thanks in advance. -San Sanjeeva Kumar P ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]