import org.apache.commons.digester.*;
import java.io.*;
import java.util.*;
public class DigesterDriver {
public static void main(
String[] args ) {
try {
Digester digester = new Digester();
digester.setValidating( false );
digester.addObjectCreate( "Cat", Cat.class );
digester.addObjectCreate( "Cat/book", Book.class );
digester.addBeanPropertySetter( "Cat/book/author", "author1" );
digester.addSetNext( "Cat/book", "addBook" );
File input = new File( "input.xml" );
Cat c = (Cat)digester.parse( input );
System.out.println( c.toString() );
} catch( Exception exc ) {
exc.printStackTrace();
}
}
}
Can you please tell me why the output is not displaying all the author names.
If there is a mistake in the way i have given the rule, please let me know how to do that too