[jdom-interest] Element.getContent() deprecated?

Mike Chambers mesh at speakeasy.org
Tue Aug 22 15:52:07 PDT 2000

I have the following snippet of code:

   List variables = root.getChildren("Variable", ns);

   for(int i = 0; i < variables.size(); i++)
    Element e = (Element)variables.get(i);
    Attribute name = e.getAttribute("name");

    System.out.println(name.getValue() + "=" + e.getContent());

When i try to compile this I get the following warning:

SAXTest.java:40: Note: The method java.lang.String getContent() in class
m.Element has been deprecated.
                                System.out.println(name.getValue() + "=" +

Note: SAXTest.java uses or overrides a deprecated API.  Please consult the
entation for a better alternative.
1 warning

Has Element.getContent() been deprecated? If so, what do I use in its place?

I built my jar file from the cvs source this afternoon.


Mike Chambers

mesh at speakeasy.org

More information about the jdom-interest mailing list