commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Keese <>
Subject Re: [digester] parsing xmlrpc message
Date Fri, 23 Jul 2004 01:53:07 GMT
I think what Simon said explains exactly how to do it. I would only add
one thing. There's a common misunderstanding people have when learning
Digester, and I wonder if you are making that mistake.

People think: "When I call addCreateObject(), it scans the input XML for
a tag matching the pattern and then creates an object on the stack". But
actually, that's not what happens at all. All the calls like
addCreateObject() just add a rule into a table. They don't even look at
the input XML. After you are finished creating all the rules, digester
sequentially processes each tag/attribute in the input XML, by applying
matching rule(s) to it.

So, the rules don't necessarily execute in the order that you wrote them
in the java source code. And, a single rule can execute many times, on
elements in different levels of the input XML. The end effect is that
you get something like recursion, although it's implemented using the
digester stack.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message