[ https://issues.apache.org/jira/browse/XMLBEANS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643161#action_12643161 ]
Aleksei Kazantsev commented on XMLBEANS-386: -------------------------------------------- The file was edited manually. And the problem is that I should be able to parse other files edited in the same way. So I need to know exactly why this file is failing. Are you sure that the reason is that "ISO-8859-1" is not valid for this file? These are all the characters which appear in the document and they are all in "ISO-8859-1": 0x3e,0x4f,0x63,0x30,0x31,0x76,0x20,0x22,0x69,0x49,0x9,0x35,0x3c,0x74,0x3d,0x73,0x6f,0x64,0x53,0x2f,0x72,0x3f,0x6c,0x67,0x2d,0xd,0x6d,0x39,0x2e,0x6e,0xa,0x38,0x78,0x65 The weird thing is that xmlbeans parses it without problems if I add or remove a space in any place of the file. Can you explain this please? > XmlObject.Factory.parse throws "Unexpected element: CDATA" > ---------------------------------------------------------- > > Key: XMLBEANS-386 > URL: https://issues.apache.org/jira/browse/XMLBEANS-386 > Project: XMLBeans > Issue Type: Bug > Components: XmlObject > Affects Versions: Version 2.4 > Environment: Java 1.5.0_11, Windows Server 2003, XmlBeans 2.4.0 > Reporter: Aleksei Kazantsev > Priority: Minor > Attachments: __d3configserver.xml > > > Attached XML fails to be parsed. > Java code to reproduce the problem: > XmlObject xml = XmlObject.Factory.parse(new > File("d:/__d3configserver.xml")); > Throws: > org.apache.xmlbeans.XmlException: d:\__d3configserver.xml:457:1: error: > Unexpected element: CDATA > at > org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486) > at > org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1276) > at > org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263) > at > org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345) > at > org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:252) > at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:639) > at > com.agfa.apomedia.translation.UtilsTest.testGetTranslatedFile(UtilsTest.java:122) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:154) > at > org.jmock.integration.junit3.VerifyingTestCase.runBare(VerifyingTestCase.java:37) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at > org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > 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:3454) > ... 24 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]