[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    accessing derivedBy exension element values
From:       Sanjeeva Kumar <sanjeeva_p2000 () yahoo ! com>
Date:       2005-06-22 13:59:09
Message-ID: 20050622135909.19744.qmail () web51407 ! mail ! yahoo ! com
[Download RAW message or body]

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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic