commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <skitch...@apache.org>
Subject Re: [Digester] XSD Support?
Date Fri, 18 Feb 2005 00:34:10 GMT
On Fri, 2005-02-18 at 12:22 +1300, Simon Kitching wrote:

> (a) selecting a parser for digester to use:
> 
> Digester can use an xml parser you explicitly provide:
>   // somehow instantiate and configure the parser you want
>   Digester d = new Digester(myparser);
> 
> Alternatively, you can allow Digester to create the xml parser instance
> (using the default java discovery mechanism to find it), then tweak its
> settings:
>   Digester d = new Digester();
>   XMLReader reader = d.getXMLReader();
>   reader.setFeature(....);
>   reader.setProperty(...);
>   etc

Or (c) use the Digester as a ContentHandler:
   parser = ...; // somehow create your own parser
   Digester = new Digester();
   d.addRule(.....);
   parser.setContentHandler(d);
   parser.setErrorHandler(myErrorHandler);
   parser.parse(...);



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message