Hello All,
I have an XML file that looks like the following:
<a>
<b>
<c/> <b/>
<b>
<c/>
</b>
</a>
I also have the following rules defined:
digester.addFactoryCreate("a/b", ....);
digester.addSetProperties("a/b");
digester.addSetNExt("a/b", ....);
digester.addObjectCreate("a/b/c", ....);
digester.addSetProperties("a/b/c");
digester.addSetNext("a/b/c", ....);
This works fine. What I want to do also is to "extract" the <b> element (and its
subelement) and then insert it into another XML document. I recognize that I have to
use the NodeCreateRule, however, I am not sure where to place the rule. From the docs,
it is mentioned that "rules that would match XML nodes under the element that matches
a NodeCreateRule will never be triggered by Digester, which usually is the behavior
one would expect.". Is it possible to mix NodeCreateRule with FactoryCreateRule?? or
should I parse the file again to extract the nodes??
Thanx for the help in advance.
- Marwan
---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now