You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jai PP <jp...@yahoo.com> on 2003/03/13 03:03:43 UTC

Using parser in Digester

Hi,
I am using Digester. Do you know how do I specify my
own parse to Digester ? I think, by default it looks
for the one in classpath. For my project , I have more
than one parser in classpath and want to use a
specific one, lets say oracleSaxParser.

I tried to extend the Digester and use the parse
protected variable but it did help

thanks!
- Jaiteerth

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

Re: Using parser in Digester

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 12 Mar 2003, Jai PP wrote:

> Date: Wed, 12 Mar 2003 18:03:43 -0800 (PST)
> From: Jai PP <jp...@yahoo.com>
> Reply-To: Jakarta Commons Users List <co...@jakarta.apache.org>
> To: commons-user@jakarta.apache.org
> Subject: Using parser in Digester
>
> Hi,
> I am using Digester. Do you know how do I specify my
> own parse to Digester ? I think, by default it looks
> for the one in classpath. For my project , I have more
> than one parser in classpath and want to use a
> specific one, lets say oracleSaxParser.
>
> I tried to extend the Digester and use the parse
> protected variable but it did help
>

Digester uses JAXP APIs to select the parser, so the mechanism for
selecting your own is described in the JAXP specification.  Among other
places, you can find that by starting at:

  http://java.sun.com/xml/jaxp/

The parser you want to use must have JAXP adapters in order for this to
work.

> thanks!
> - Jaiteerth

Craig McClanahan

Re: Using parser in Digester

Posted by Janek Bogucki <ya...@studylink.com>.
Hi Jaiteerth,

> From: Jai PP <jp...@yahoo.com>
> Reply-To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
> Date: Wed, 12 Mar 2003 18:03:43 -0800 (PST)
> To: commons-user@jakarta.apache.org
> Subject: Using parser in Digester
> 
> Hi,
> I am using Digester. Do you know how do I specify my
> own parse to Digester ? I think, by default it looks
> for the one in classpath. For my project , I have more
> than one parser in classpath and want to use a
> specific one, lets say oracleSaxParser.
> 
> I tried to extend the Digester and use the parse
> protected variable but it did help
> 
> thanks!
> - Jaiteerth

According to the API docs these two constructors are available which may
help:

    Digester ( javax.xml.parsers.SAXParser parser )

    Digester ( org.xml.sax.XMLReader reader )

Cheers,
Janek