Re: Should I use sax?
Michael Glavassevich <[email protected]> Mon, 22 May 2006 15:22:21 -0400
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <OFB0EF3599.ADFF1818-ON85257176.00674FAA-85257176.006A6EE3__5420.13049494034$1148325898$gmane$org@ca.ibm.com> |
Roberto Cosenza <[email protected]> wrote on 05/22/2006 11:20:26 AM: > Hi David. Thank you for your clarification. > It is clear, SAX is the way to go for me. > I confirm that sax is reading the doctype and doing the validation > accordingly. It was missleading that the XMLSerializer was outputting > the "Strict" doctype unregarding of the input one. If you're writing new code, I would avoid using Xerces' native serializers. They are non-standard, not particularly well maintained and likely to be deprecated [1] soon (perhaps in the next release). JAXP's TransformerHandler [2] is a much better choice for serializing SAX events. > I have one more question: > Parsing a document which contains the fragment > <a href="mylink.html" >mylink</a>, generates events also for the > a-attribute 'shape="rect"', which is not given in input!! > Is there any way to turn this behavior off? It seems like the parser is > inserting some implicit attributes here and there... > /Roberto [1] http://xerces.apache.org/xerces2-j/faq-general.html#faq-6 [2] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/transform/sax/TransformerHandler.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [email protected] E-mail: [email protected] ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ List: sax-devel, [email protected] See: http://www.saxproject.org/ https://lists.sourceforge.net/lists/listinfo/sax-devel