Note that the subject is misleading: The goal isn't to "prevent
DeferredTextImpl", but to suppress text nodes which a specific application
would prefer to ignore.

If you just want to suppress whitespace-in-element-content as defined by
the DTD, one of the parser features
(http://apache.org/xml/features/dom/include-ignorable-whitespace(Embedded
image moved to file: pic27740.gif)) can do that for you. If there's other
text you want to get rid of -- if you need to consider schemas or the
specifics of your own application -- you'll have to do it yourself.

DOM Level 3 is introducing the concept of document construction filters,
which you could use to implement this. But unless you're willing to rely on
beta code or wait forl DOM3 to become a Recommendation, the most portable
suggestion I can offer would be to use a SAX parser, run it through a SAX
filter which implements the additional text suppression, and run that into
a SAX-to-DOM builder.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

<<attachment: pic27740.gif>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to