[jdom-interest] Problem parsing a XML file

Kevin Baynes kbaynes at renex.com
Tue Feb 27 09:19:28 PST 2001


I replaced all occurances of the tag <näyttelijät> with <abcdefg> and JDOM
with Xerces read the file just fine.

What characters are disallowed inside XML tags? Is Xerces correct in
reporting the error, or is it a bug?

-Kevin Baynes

-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Jason Hunter
Sent: Monday, February 26, 2001 3:01 PM
To: Marko Lahma
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] Problem parsing a XML file


Marko Lahma wrote:
>
> I have been having problems with parsing this XML file:
> http://www.finnkino.fi/xml/tampere.asp .
>
> 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?

I see the same error when using Xerces 1.2, the one bundled with
jdom-b6.  When I try Crimson as the parser, it works just fine.  Looks
like a Xerces bug.  You might want to experiment with a newer Xerces
(let us know if you find any issues) or switch to Crimson for the time
being.

-jh-
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com




More information about the jdom-interest mailing list