Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
saxparser ignore <!doctype> line
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="SnooPac, post: 595996"] Ok, I used a variation of this, and it seems to be working. Although I don't really understand it, so it seems rather cludgy. I didn't use saxbuilder or anything. I just overrode the resolveEntity() function from DefaultHandler (in my handler class). The other problem I had was that my publicId was being reported as null, and systemId was reported as file://path/to/myfile.dtd. So I cant really do anything in my if statement concerning publicId. so now I have my resolveEntity() returning "<?xml ..." regardless. I guess I could do some kind of processing on systemId (like check if it starts with file:// and ends with .dtd, or something else that's simple). Another thing I don't understand, is what exactly happens when I return that <?xml... stuff? Will the parser now continue parsing the document using the InputSource thats returned instead of the <doctype> line from the xml file? Thanks again, Aiman [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
saxparser ignore <!doctype> line
Top