xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramesh Regulapati <rrameshra...@yahoo.com>
Subject Help with Substitution Group
Date Wed, 10 Dec 2003 15:36:26 GMT
Hi David,

Recently we have started using XMLBean in our
project.We as a team are new to XML schema and
XMLBeans.

We went through the documentation and mailing list to
see if any one else had solution to the problem we are
facing.
Since it was not listed, thought we would ask your
help.

We generated the class files using the utility.

The problem we are facing is how to read this xml and
get A1Record object from Record type.
	
	XMLSchema
	__________
	
	<?xml version="1.0" encoding="UTF-8"?>
	<schema targetNamespace="http://www.me.com/abc"
xmlns:q="http://www.me.com/abc"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified" version="3.0.0.0">
		<include schemaLocation="A1Record.xsd"/>
		<include schemaLocation="A2Record.xsd"/>
		<include schemaLocation="A3Record.xsd"/>
		<include schemaLocation="A4Record.xsd"/>
		<element name="RecordGroup"
type="q:RecordGroupType">
		</element>
		<complexType name="RecordGroupType">
			<complexContent>
				<extension base="q:GroupType">
					<sequence>
						<element ref="q:Record"/>
					</sequence>
				</extension>
			</complexContent>
		</complexType>
		<complexType name="GroupType" abstract="true">
			<sequence>
				<element name="Owner" type="q:OwnerType">
				</element>
				<element name="Timestamp" type="dateTime">
				</element>
			</sequence>
		</complexType>
	</schema>
	
	XML Data File
	--------------
	<?xml version="1.0" encoding="UTF-8"?>
	<RecordGroup xmlns="http://www.me.com/abc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
		xsi:schemaLocation="http://www.me.com/abc
c:\RecordGroup.xsd" id="1" name="1234" seq="1"
batchID="57301">
		<Owner>
		        <Name></Name>
  	        </Owner>
	        
	        <Timestamp></Timestamp>
                
                <A1Record>
                <?A1Record>
		
	</RecordGroup>	
	
	Code Used
	---------
	
	RecordGroupType recordType =
RecordGroupType.Factory.parse(xmlfile);
	       
	
	
	
RecordType has only getOwner(), getTimestamp(), and
getRecord() these getter method.
Record is not being parsed and getRecord() is
returning null always.
How do I get hold of A1Record?
	       
Thanks in Advance
Ramesh R

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message