Hello Craig,
as always you gave the conclusive hint. Perhaps you should add an example of the usage
of
this methods to the documentation. It would make things much more clearer.
thanks,
Jens
"Craig R. McClanahan" wrote:
Jens Rehphler wrote:
Hello Steven,
I think I didn't described
Jens Rehphler wrote:
Hello Craig,
as always you gave the conclusive hint. Perhaps you should add an example of the
usage of
this methods to the documentation. It would make things much more clearer.
Good idea. I'm adding an example of using this technique to the Developer's Guide
page
Hi all,
I'm trying to read the body content of a xml tag with the Digester class. By
using the standard methods from the class I only get an empty String. Here's the
example code (i justed played around with the user database from the struts
example):
Digester Code:
// this works fine
It also has to do with your class structure and your xml.
I haven't tested this, but try this
public class User {
private Tagwithbody twb = null;
public void setTagwithbody(Tagwithbody theClass) { twb = theClass; }
public Tagwithbody getTagwithbody() { return twb; }
}
public class
Hello Steven,
I think I didn't described my problem correctly. Parsing the properties of a tag works
well. But I want to parse the content between some tags. For example:
database
user propertie="name"
textthis is the value i want to initialize my class with/text
/user
/database
Jens Rehphler wrote:
Hello Steven,
I think I didn't described my problem correctly. Parsing the properties of a tag
works
well. But I want to parse the content between some tags. For example:
database
user propertie="name"
textthis is the value i want to initialize my class
I've been using a slightly simpler method than Craig's to get the body
content. I use this:
digester.addCallMethod("database/user/text", "setText", 0);
I got the idea for this from the JavaDoc comment for addCallMethod, which
says that specifying zero for the parameter count means "a single
[EMAIL PROTECTED] wrote:
I've been using a slightly simpler method than Craig's to get the body
content. I use this:
digester.addCallMethod("database/user/text", "setText", 0);
I got the idea for this from the JavaDoc comment for addCallMethod, which
says that specifying zero for the
8 matches
Mail list logo