Hi,

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. It just
gives the modifier i have. Please let me know how to
access the value in case of derivedBy extension.

Thanks in advance.

-San



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to