You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by B Moody <br...@agilent.com> on 2006/07/28 01:37:57 UTC
Newbie question - CData exception
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: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Newbie question - CData exception
Posted by B Moody <br...@agilent.com>.
Figured it out - was passing the file name as a string to 'parse' - it's
expecting xml.
--
View this message in context: http://www.nabble.com/Newbie-question---CData-exception-tf2012623.html#a5542517
Sent from the Xml Beans - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org