Forums Register Login

SAXParser error parsing <xi:include

+Pie Number of slices to send: Send
Hi All,
Even though I passed the following argument to the JVM when calling my parser class, the parser displays error

---JVM argument--
SOME_VAR=-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration

----Error----
cvc-complex-type.2.4.a: Invalid content was found starting with element 'myFile'. One of 'xx' is expected

When I add
myParser.setFeature("http://apache.org/xml/features/xinclude", true); , before parsing, I get no error.

Since I have already passed the [org.apache.xerces.xni.parser.XMLParserConfiguration
argument], I should not have needed to 'setFeature' that stuff, right?

Please advise if you know what is going on here.

Thank you for your time.

***
Here is what I did:
(1)create a parser (saxparser)
(2) set some properties
(3) parse

Here is sample



Cheers,
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1117 times.
Similar Threads
Validating an Instance Document
URGENT - Setting feature for SAX Parser in Xerces.
Validating XML with XSD..problems
SAXNotRecognizedException
Error with schema validation
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:24:10.