On Sat, 2005-12-10 at 02:23 -0700, Mike Sparr - www.goomzee.com wrote:
> If I have a document (note the content element referencing external
> Some name of a document
> A brief description of a quotable phrase from
> This is the heading of the document
> This is the sub-heading of the
> This is the body content of the document
> and I can have some text that references a
> term that may require more explaination so
> I add a strangeword and this footnote will appear at
> the bottom of the document.
> I am new to digester but understand I have to write getter/setter
> classes to represent the different elements. Can someone help with
> writing the rules to digest this? I would like some flexibility to have
> zero, one or more namespaces declared in my element and the
> digester will "digest" the elements within these.
> For example, this instance uses a namespace and scheme defined by myco,
> but we may want just text with no namespaces, or use
> xmlns:xhtml="http://www.w3.org/xhtml/schema" and embed html in the
> Where do I start?
There are a number of good resources for learning Digester.
There is a list of articles availabel on the wiki:
There is a general overview of digester in the javadoc:
There are also a number of example applications available. They are
included in the source downloads for digester, or can be browsed
directly from the subversion repository:
Note that Digester's support for xml namespaces is quite weak; it was
originally written before namespaces existed and that shows. A rule can
be associated with a namespace; this ensures that the *last* element in
the match path is in the specified namespace. However there is no
control over namespace-matching for the other parts of the path. As am
example, a rule with path "foo/bar/baz" and namespace "urn:ns1" will
only match baz elements in the specified namespace, but foo and bar will
match elements in any namespace. This looks like it will be acceptable
for your purposes though.
Once you have read the available info, I'm happy to answer any specific
questions you may have...
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org