[jdom-interest] DocType Modification
Frank.Sauer at trcinc.com
Tue Jun 12 10:33:54 PDT 2001
You could use SAXBuilder.setEntityResolver and pass it an
EntityResolver that simply remembers the system and public ids
and use those to set on the DocType before writing it out.
The Technical Resource Connection, Inc.
a wholly owned subsidiary of Perot Systems
Java: The best argument for Smalltalk since C++
From: Jason Hunter [mailto:jhunter at collab.net]
Sent: Tuesday, June 12, 2001 1:16 PM
To: Kevin Baynes
Subject: Re: [jdom-interest] DocType Modification
Kevin Baynes wrote:
> I have an XML document with the following doctype declaration:
> <!DOCTYPE users SYSTEM "users.dtd">
> After using JDOM to open and modify the contents, JDOM writes the doctype
> <!DOCTYPE users SYSTEM
> Why does this happen?
The SAX parser calculates the absolute path and passes it to JDOM. JDOM
never sees the relative path.
> Is my usage incorrect?
Nope, you're doing fine.
> Is there a way to prevent this?
I really hope so. But I don't know of any SAX feature addressing this.
It may require JDOM plugging into the parser underneath SAX. Anyone
To control your jdom-interest membership:
More information about the jdom-interest