Hi, I'm pretty new to xmlbeans, have couple questions that may seem pretty basic...
Assuming I am Parsing an xml instance using : XmlObject xobj = XmlObject.Factory.parse(myinstance) I now want to : 1. ) discover what is the specific document type (CherryDocument, AppleDocument, etc) and 2) Once I know the specific doc type, cast the generic XmlObject accordingly. Constraints: a) the code can have no knowledge of any document types, therefore i cannot go thru a series of "instanceof" to check what the incoming type is, because I cannot know what types even exist. So, I am hoping to do something like XmlObject xobj = XmlObject.Factory.parse(myinstance) type = xobj.getDocType( ); Class type = (type)xobj; ...or similar. When I do getClass, it comes up with something like PineappleDocumentImpl, from which i need the PineappleDocument. I am having tough time figuring how to work this with Class.forName and similar to make this happen. How can i get the specific document type from XmlObject then cast the instance to that specific type? Any hints? Thanks, Alan J. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

