[jdom-interest] Trusting parsers with namespaces

Elliotte Rusty Harold elharo at metalab.unc.edu
Sun Apr 6 09:06:13 PDT 2003


At 1:40 PM -0700 4/2/03, nobody wrote:


>CVS Breaks out the JAXP work into a package protected JAXPParserFactory class.
>CVS Simplifies the SAXBuilder by removing the element Stack.
>CVS Trusts the SAX parser to correctly report namespaces (can we trust that?)


Yes, you can trust that provided that you set the necessary namespace 
features on the parser. (They are generally not set correctly by 
default.) YOu also need to put code in setFeature() to make sure that 
programmers don't accidentally or intentionally change the namespace 
features to other than what we want them to be.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list