"ying lcs" <[EMAIL PROTECTED]> wrote on 10/06/2006 04:21:27 PM:
> Hi,
>
> I have a few questions about the SAX example DocumentTracer.java
>
>
> 1. Why I need to implement 2 startElement methods? Is there a simpler
way?
>
> public void startElement(String name, AttributeList attributes)
> throws SAXException {
> }
>
> public void startElement(String uri, String localName, String qname,
> Attributes attributes) throws SAXException
{
>
> }
>
> 2. Why DocumentTracer implements DocumentHandler which is deprecated
> in SAX2 And why does it call '
> ((Parser)parser).setDocumentHandler(tracer); ? If I try not to use
> deprecated methods, how should I set the document handler?
The sample shows how to use SAX1 and SAX2. Unless your application needs
to deal with a SAX1 parser you don't need to write a DocumentHandler.
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]