[jdom-interest] how to create an element here

Mark Hale Mark at beforethecall.com
Thu Jul 28 09:27:50 PDT 2005

Hi Narahari.
I think what you want to do is create an individual Element.
    Element hourdata = new Element("hourdata");
You can then add this to a document later:
    Document d = ... your existing document;
If you reuse hourdata, you can clone it:
        d.getRootElement().addContent((Element) hourdata.clone());


From: jdom-interest-bounces at jdom.org
[mailto:jdom-interest-bounces at jdom.org] On Behalf Of Narahari
Sent: Thursday, July 28, 2005 8:52 AM
To: jdom-interest at jdom.org
Subject: [jdom-interest] how to create an element here

Hello Folks,
I want to create just one element with this data ?  How do I do this ?
<hourdata hour="140000" curtemp="88" dewpointtemp="72" windspeed="4"
winddir="290" weather_conditions="" relative_humidity="60"
icon_link="http://www.nws.noaa.gov/weather/images/fcicons/tsra.jpg" />


More information about the jdom-interest mailing list