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,
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,