I'm developing an Java application who read some data from an xml file. Trying to execute, I get this error:
org.xml.sax.SAXParseException; systemId: file:/c:/myxmlfile.xml; lineNumber: 7; columnNumber: 55; s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'My Name Value'.
My xml file starts with:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gdl_set xmlns="http://www.mywebsite.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mywebsite.com/myxsddefinition.xsd"
shortname="Shortname">
<name>My Name Value</name>
Can you help me to understand where's the problem?
It looks to me as if the parser is for some reason trying to process your instance document as a schema file.
Yes I also got the same issue, then I found the that I was passing the XSD file as an input of XML file.
Like that -
String xsdPath= "122015/1224/sample.xml";
String **xmlPath** = "122015/1224/sample.xsd";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With