xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kathiresan jeyapandian <j_kathire...@yahoo.co.in>
Subject Returning XmlAnyTypeImpl instead of XmlObject
Date Fri, 11 Mar 2005 08:28:33 GMT
pls help me in this xmlbean issue....
i am having a 4 classes which all extends XmlObject such as 

purchaseDocument extends XmlObject
salesDocument extends XmlObject
exportDocument extends XmlObject
importDocument extends XmlObject

i am passing the an correct xml file which conforms to the schema and 
it is returning any one of the above instance

XmlObject xmlObj = XmlObject.Factory.parse(xmlFile);

i am checking with the instance as follows :

if(xmlobj instanceOf purchaseDocument)
if(xmlobj instanceOf salesDocument)

this is perfectly working...

----but pls look in the below scenario

In the purchase i had 10 orders...when i like to pass one order tag of 
the entire xml...
the xml looks like

<xml-fragment><purchaseorder>........ </purchaseorder></xml-fragment>

when i parse this it returns 

in this case i could not able to check whether it is an instance of any 
of the four.....

Can anybody please help me to solve this issue....1 ) how to remove the 
fragment tag 

2) how to parse and return any one instance of the four ...


Yahoo! India Matrimony: Find your life partneronline.
View raw message