Hello I was reading Javadoc for XmlObject, it says this:
=========== Type inference. When using XmlObject.Factory to parse XML documents, the actual document type is not type itself, but a subtype based on the contents of the parsed document. If the parsed document contains a recognized root document element, then the actual type of the loaded instance will be the matching Document type. For example: XmlObject xobj = XmlObject.Factory.parse(myDocument); if (xobj instanceof MyOrderDocument) // starts w/ <my-order> { MyOrderDocument mydoc = (MyOrderDocument)xobj; if (!xobj.validate()) System.out.println("Not a valid my-order document"); } else { System.out.println("Not a my-order document"); } =========== When I run this code against my XMLs, then it xobj's type is XmlAnyTypeImpl. I can have one of the two root elemets Policy and PolicySet. I expected that xobj would be either PolicyDocument or PolicySetDocument, as it's stated in Javadoc. Can someone help me with this? Thanks, Argyn --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]