I will rephrase my earlier question as it may have been a bit much:
I have seen this...
XmlObject xobj = XmlObject.Factory.parse(myDocument);
if (xobj instanceof MyKnownDocument ) {
MyKnownDocument mydoc = (MyKnownDocument )xobj;
if (!xobj.validate())
System.out.println("Not a valid my-order document");
}
...which is fine if you have knowledge of MyKnownDocument to begin with. If you
do not know it, is it possible to extract the document type associated with
myDocument/xobj, and then cast xobj to that? The myDocument is an instance of
_some_ kind of Document, I just need to find out _which_ Document, then cast it
similar to the above so I can then pass xobj along for further processing.
Are there examples of this?
Thanks,
AJ