[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: DocumentHandler with xml4j DOMParser

  • From: LUCIO PICOLLI <lucio.piccoli@o...>
  • To: xml-dev@i...
  • Date: Thu, 11 Mar 1999 8:18:00 +0000

xml4j domparser

> <You_Said>
> Hi all,
> I am using IBM's xmlj2.0.3 XML parsers. I am having the following
> problem:
> When i set my own document handler with a DOMParser, the
> handler is never
> invoked upon. However when i use the SAXParser it does. Why
> does the
> DOMParser not invoke the DocumentHandler yet hte SAXParser does?
> The docs does not throw any light on the problem.
> Is there a fundamental problem with using a DocumentHandler with a
> DOMParser?
>
>  One2One              LUCIO.PICCOLI@o...
> </You_Said>
>
> I don't know about the version of your XML4J, but in mine (1.1.9), the
> documentation states that DocumentHandler is to be used with
> the SAX Parser
> to eb informed of parsing events. This is logical, since the
> main difference is that DOM parsers parse the whole document into a   
resulting
> DOM tree, and SAX parsers are used for event based processing.
>
> There doesn't appear to be any way to create a
> DocumentHandler on class com.ibm.xml.parser.Parser, but you can from
> org.xml.sax.DocumentHandler.
>Did they change this in your newer version?

I am not sure what you mean here. The Documenthandler i used was a   
instance of org.xml.sax.DocumentHandler. The   
setDocumentHandler(DocumentHandler handler)  is a method on the   
org.xml.sax.Parser. Since all the ibm parser class implement this   
interface then why doesn't it work?

I viewed the source code to the DOMParser and noticed that in the   
constructor it calls setDocumentHandler( this ). So it using itself as   
the document handler. Is it OK to have more than one DocumentHandler?

In fact the bigger question is using a DocumentHandler on the DOMParser   
the correct thing to do when attempting to extract the content?


 -lucio

>
> Ed
>
>
> Ed Howland
> ed@d...
> http://www.dega.com
> "As your attorney, I advise you to take some adrenalchrome"
>
> -----Original Message-----
> From: LUCIO PICOLLI [mailto:lucio.piccoli@o...]
> Sent: Wednesday, March 10, 1999 11:12 AM
> To: xml-dev@i...
> Subject: DocumentHandler with xml4j DOMParser
>
>
> xml-dev: A list for W3C XML Developers. To post,
mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on   
CD-ROM/ISBN
981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following   
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.