On my first try of running XmlBeans, I get the following exception thrown:

Unexpected exception: org.apache.xmlbeans.XmlException: error: Unexpected
element: CDATA
        at 
org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3467)
        at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:706)
        at 
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:690)
        at 
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:677)
        at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208)
        at 
com.agilent.nsto.xsd.AvailableMeasurementsDocument$Factory.parse(Unknown
Source)
Caused by: org.xml.sax.SAXParseException: Unexpected element: CDATA
        at
org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
        at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
        at 
org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3435)

My XML is:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

<AvailableMeasurements xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="availmeas.xsd">
        <Measurement>
                <Name>RanapTotal</Name>
                <FormatterClass>IsIntSet</FormatterClass>
                <CdrField>1</CdrField>
        </Measurement>
</AvailableMeasurements>

My Java code that throws the exception is:

        AvailableMeasurementsDocument amDoc =
AvailableMeasurementsDocument.Factory.parse(xmlConfigFile);
        AvailableMeasurements availMeas = amDoc.getAvailableMeasurements(); 


Any suggestions?

-- 
View this message in context: 
http://www.nabble.com/Newbie-question---CData-exception-tf2012623.html#a5531320
Sent from the Xml Beans - User forum at Nabble.com.


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

Reply via email to