Programming Tutorials

Comment on Tutorial - XML and Java - Parsing XML using Java Tutorial By Maggie



Comment Added by : Lee Murray

Comment Added at : 2010-11-02 03:41:56

Comment on Tutorial : XML and Java - Parsing XML using Java Tutorial By Maggie
I have modified this example a bit and I'm using a different xml file. I am getting the following error:

[Fatal Error] subject.xml:4:233: The entity "rsquo" was referenced, but not declared.
org.xml.sax.SAXParseException: The entity "rsquo" was referenced, but not declared.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at DomParserExample2.parseXmlFile(DomParserExample2.java:42)
at DomParserExample2.runExample(DomParserExample2.java:24)
at DomParserExample2.main(DomParserExample2.java:115)
Exception in thread "main" java.lang.NullPointerException
at DomParserExample2.parseDocument(DomParserExample2.java:54)
at DomParserExample2.runExample(DomParserExample2.java:27)
at DomParserExample2.main(DomParserExample2.java:115)


Anyone know how to solve this?


View Tutorial