commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marwan Aziz <>
Subject NodeCreateRule Question
Date Fri, 21 Nov 2003 17:26:04 GMT
Hello All,
I have an XML file that looks like the following:
      <c/>   <b/>

I also have the following rules defined:
digester.addFactoryCreate("a/b", ....);
digester.addSetNExt("a/b", ....);
digester.addObjectCreate("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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message