[jdom-interest] Problem parsing a XML file
Marko Lahma
marko.lahma at sci.fi
Sun Feb 25 03:51:15 PST 2001
I have been having problems with parsing this XML file:
http://www.finnkino.fi/xml/tampere.asp .
This file has finnish chars like a-umlaut and o-umlaut. These I change to
'a' and 'o' on the fly to ensure it is not a language problem.
Next thing I do is make sure that the file doesn't start with empty line.
After these things have been taken into account i save this xml data to
file. IE and XMLWriter seem to both agree that is is valid XML data (as it
was before changing letters and deleting first new line).
Then I try to load this from and parse it with JDOM-b6. I've tried both
loading with FileReader and StringReader which reads from contructed
String. Still I get the same error:
java -classpath ".;xerces.jar;jdom.jar" irssibot.modules.Movies
org.jdom.JDOMException: Error in building: null
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:411)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:499)
at irssibot.modules.Movies._$2264(Movies.java:152)
at irssibot.modules.Movies.main(Movies.java:310)
Root cause: java.lang.NullPointerException
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:878)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:395)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:499)
at irssibot.modules.Movies._$2264(Movies.java:152)
at irssibot.modules.Movies.main(Movies.java:310)
.......
Any ideas?
Marko Lahma
Marko.Lahma@#NOSPAM#sci.fi
More information about the jdom-interest
mailing list