[jdom-interest] Debugging jdom event handling

Alex Rosen arosen at silverstream.com
Sun Mar 10 22:04:51 PST 2002

You're parsing a document, right? This error is coming from the underlying
XML parser, not from JDOM. SAXBuilder uses an XML parser like Xerces or
Crimson to parse the document, so you'll have to look there for answers. You
might try testing it with a different parser also. (Your file looks fine to
me, though.)


> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of David M. Karr
> Sent: Saturday, March 09, 2002 5:26 PM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] Debugging jdom event handling
> I'm trying to figure out how to make jdom more "verbose", so
> I can track all
> the document pieces it is finding.  I need to do this because
> I'm getting a
> parsing error from it that I don't understand.
> I'm seeing the following exception:
> org.jdom.JDOMException: Error on line 7: Value must be quoted.
> The beginning of the document I'm trying to parse is this:
> ------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE calendar-data SYSTEM "file:./calendarData.dtd">
> <calendar-data>
>  <event-types>
>   <event-type id="birthday" color="green">Birthdays</event-type>
>   <event-type id="holiday" color="blue">Holidays</event-type>
>   <event-type id="inservice" color="yellow">In-Service
> Days</event-type>
>   <event-type id="misc" color="grey">Miscellaneous</event-type>
>  </event-types>
> ------------------
> I've stared and stared at this, and I don't see anything
> wrong with line 7, or
> any of the lines around it.  I was thinking that if I could
> interpose event
> handlers so I could add print statements, I could watch the
> process a little
> closer.
> I also had some trouble getting the "DOCTYPE" element
> correct, the system
> identifier in particular.  I tried using just
> "file:calendarData.dtd", but that
> got an exception:
>   Relative URI "file:calendarData.dtd"; can not be resolved
> without a base URI.
> --
> ===================================================================
> David M. Karr          ; Java/J2EE/XML/Unix/C++
> dmkarr at earthlink.net
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com

More information about the jdom-interest mailing list