Dan Diephouse wrote:

Is it possible to lookup and find the XmlObject class for a particular xml element? Obviously this is possible because when XmlBeans parses a document via XmlObject.Factory it will return your custom generated types. I just can't figure out how to do it... I'm looking for something like:

Class myXmlBeanClass = XmlObject.findType(new QName("http://some/ns";, "localName"));

Ideas? Cheers,
- Dan

Goodness, I forgot I had done this before... A code snippet for those of you who need to know this:

       SchemaTypeLoader loader =
XmlBeans.typeLoaderForClassLoader(XmlObject.class.getClassLoader());

       Class clazz = loader.findDocumentType(schemaType).getJavaClass();

--
Dan Diephouse
Envoi Solutions LLC
http://netzooid.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to