Hi Kurt,
OK now I got it :D The Digester instance supports only 1 Rules
instance at time, you can't use 2 or more Rules instance at the same
time.
BTW all Rules implementations should support the basic matching
pattern, so the Regexp one I suggested you would work as well for your
case.
Even if I
Ok, let me change the asking way. How to set RulesA and RulesB at the same
time?
btw:r u the digester developer? :)
Thanks.
On Fri, 01 Apr 2011 18:48:09 +0800, Simone Tripodi
wrote:
Sorry, I lost you, didn't understand :( Please provide me a more
concrete sample, please
Simo
http://
Sorry, I lost you, didn't understand :( Please provide me a more
concrete sample, please
Simo
http://people.apache.org/~simonetripodi/
http://www.99soft.org/
On Fri, Apr 1, 2011 at 9:37 AM, Kurt Xu wrote:
> Hi Simone:
> Maybe you got me wrong. Two RulesX needs calling setRules twice ,right? H
Hi Simone:
Maybe you got me wrong. Two RulesX needs calling setRules twice ,right?
How could be just set once.
Thanks
Kurt
On Fri, 01 Apr 2011 15:27:09 +0800, Simone Tripodi
wrote:
Hi Kurt
Ok now I get it: exactly, calling Digetser.setRules() you loose all
the already set Rules in
Hi Kurt
Ok now I get it: exactly, calling Digetser.setRules() you loose all
the already set Rules instance, so it would be better if you call it
first.
HTH,
Simo
http://people.apache.org/~simonetripodi/
http://www.99soft.org/
On Fri, Apr 1, 2011 at 9:14 AM, Kurt Xu wrote:
> Hi Simone:
> I me
Hi Simone:
I mean if I implement rules ,say RulesA, RulesB , then setRules(new
RulesA()),setRules(new RulesB()).
the second calling setRules would reset the first call, right?
Thanks.
Kurt
Hi Kurt,
glad you fixed your issue, but honestly I didn't understand your last
question, apol
Hi Kurt,
glad you fixed your issue, but honestly I didn't understand your last
question, apologizes :( Can you provide more details/some sample?
Thanks!
Simo
PS nope, I'm from Italy :P
http://people.apache.org/~simonetripodi/
http://www.99soft.org/
On Fri, Apr 1, 2011 at 3:21 AM, Kurt Xu wrot
Hi Simone:
I tried by myself after emailing and resovled it . the method is the
same as your reply. I have a question still though. What if I want do set
two customized rule . The second setRules can reset or override the first
calling, can't it?
btw: why u say ni hao, r u from Chi
Ni hao again Kurt,
just realized that the ParaItemRule implementation is incomplete, use
the one below.
Simo
public final class ParaItemRule extends org.apache.commons.digester.Rule {
@Override
public void body(String namespace, String name, String text)
throws Exception {
digester.p
Hi Kurt,
calling the setRules() method in the way you did, makes the Rules
instance is reset, so you loose the already set patterns.
modify the code in order that the setRules() method is invoked before
setting patterns/rules.
HTH,
Simo
private void parseProject2(URL url) throws IOException, SAXEx
Hi Kurt,
I suggest you first creating a digester rule that helps you handling a
generic ParaItem element:
public final class ParaItemRule extends org.apache.commons.digester.Rule {
@Override
public void body(String namespace, String name, String text)
throws Exception {
digester.p
11 matches
Mail list logo