commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Veerendra" <>
Subject Problem with Digester
Date Fri, 08 Apr 2005 06:34:22 GMT
	I want to use digester frame work. I took some example from net modified
for my testing, but when I am not getting the result as null. if I use
uniqueid instead of UniqueID in xml it is working. is that case sensitive.
Can some body pls help me.

Thank You,

Here is my programs.

Test.xml :

<?xml version="1.0" encoding="UTF-8"?>
<gp:academy UniqueID="JAcademy"

package com.tesdig;
import java.util.Vector;

public class Academy {
    private String UniqueID;

    public Academy() {

    public String getUniqueID() {
        return UniqueID;

    public void setUniqueID(String newUniqueID) {
        UniqueID = newUniqueID;

    public String toString() {
        StringBuffer buf = new StringBuffer(60);

        buf.append("Academy UniqueID>> " + this.getUniqueID());

        return buf.toString();

package com.tesdig;

import org.apache.commons.digester.Digester;

public class DigestJavaAcademy {
    public static void main(String[] args) throws Exception {
        DigestJavaAcademy d = new DigestJavaAcademy();

    public void digest() throws Exception {
        Digester digester = new Digester();

        digester.addObjectCreate("academy", Academy.class);

        //Set the attribute values as properties

        //Parse the XML file to get an Academy instance
        File input = new File( "academy.xml" );
        Academy a = (Academy) digester.parse(input);

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message