commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Diviacco <patrick.divia...@gmail.com>
Subject [digester] how can I print children tags instead of only tag content ?
Date Fri, 13 May 2011 16:48:02 GMT
I need to print the content of <categ> in my XML file (including children
tags).

For example, if I have <categ><child></child></categ>, I want to print
"<child></child>"

I'm currently parsing the xml file with:
digester.addCallMethod("collection/doc/categ",
 "checkCateg", 0);

and this is the checkCateg function:
public void checkCateg(String categ) {
System.out.println(categ);
}

It doesn't work. The string categ is always empty because it only contains
text content in <categ> but not its children tags.

thanks,
Patrick

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message