tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Bergquist" <>
Subject Migrating code that uses xml-tr to the new xml parser
Date Tue, 28 Nov 2000 00:06:52 GMT
I tried running my Tomcat 3.1 code that uses the xml-tr package with Tomcat
3.2Beta7 with no success.  Any of my code that parsed XML documents failed
under 3.2.  After further investigation, I've determined what the problem
is.  With the Sun parser/dom implementation that comes with xml-tr,
ignoreable whitespace is ignored by default.  This means that you will not
see Text nodes that are just whitespace that is used for document formating
within the DOM model.  With the xml package with 3.2, the default is just
the opposite; ignorable whitespace is not ignored and shows up as Text
nodes.  If you've written your DOM processing code not to expect Text nodes
that represent ignoreable whitespace, your code will fail miserably.  If you
get a hold of the XmlDocumentBuilder instance, you can call
setIgnoringLexicalInfo(true) to get back the old behavior.

Just in case someone else runs into this problem.

View raw message