xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <as...@cs.indiana.edu>
Subject v1: efficient detecting if XML can be mapped to XmlPbject ...
Date Fri, 19 Mar 2004 23:31:07 GMT
hi,

one way to check if XML fragment can be mapped by XmlBeans to known 
XmlObject is try to do it:

   try {

            XmlObject response = XmlObject.Factory.parse(xmlString);

        } catch (XmlException e) {
            //not supported
        }

is there some better method? (efficiency)?

if i know QName of top element (or its xsi:type if present) will

     
if(XmlBeans.getContextTypeLoader().findType(javax.xml.namespace.QName) 
!= null) { ... }

be the best way to do such check?

thanks,

alek

-- 
The best way to predict the future is to invent it - Alan Kay


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message