[jdom-interest] java.lang.Verify error : getting data from JD OM element

Mark Hortman mark.hortman at jcafeinc.com
Mon Sep 16 12:37:13 PDT 2002


Dude,

Stop using cut and paste, 
Change the B to C and your program works.......



Hi,

Could someone show me how to get the value 2 out of the element elm?

Various permutations of the following result in a java.lang.Verify error.

Thanks,

em

import org.jdom.*;
import org.jdom.output.*;

public class C {
    C() {}

    public static void go() {
        Element elm = new Element("one");
        elm.addContent(new Element("two").addContent("2"));
        try {
            String c = elm.getChildText("two");
            System.out.println( " 2 = " + c);
        } catch ( Exception ex ) {
            System.out.println("didn't get it");
        }
    }

    public static void main(String args[] )
    {
        (new B()).go();
    }
}

--
Emmett McLean
emmettwa at onebox.com - email
(866) 841-9139 x1160 - voicemail/fax



More information about the jdom-interest mailing list