commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Vinson <vinson.li...@charter.net>
Subject Re: [Digester] XSD Support?
Date Fri, 18 Feb 2005 13:14:11 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

After many struggles yesterday, i figured out how to do it from
scanning Sun's java forums.  As you mentioned and as was mentioned in
the GMANE link i sent, passing in a pre-configured parser seems like
the cleanest way to handle it.

I appreciate the feedback.  Validation with schemas is something that
is relatively new to me.
Jason


Simon Kitching wrote:

| 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
|
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCFeoiAQ71cZOfvEQRAmYqAJ9SXmraWtKHxXTcxt979vPnG63g9ACfa6gm
0mNydkqg45lTB8Pbu4BUahc=
=eSq2
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
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