<div>Dear Sir/Miss/Madam,</div>
<div>I want to add the element together with its children.</div>
<div>However,I got problem during add children. I don't know why</div>
<div>the error said it can't find getChildren function.</div>
<div>
<div>In fact I already import the library needed.</div></div>
<div>Below was my code:</div>
<div>
<p><em>import java.io.IOException;</em></p>
<p><em>import org.jdom.Document;<br>import org.jdom.Element;<br>import org.jdom.JDOMException;<br>import org.jdom.input.SAXBuilder;<br>import org.jdom.xpath.XPath;<br>import java.util.*;</em></p>
<p><em>import java.io.*;<br>import org.jdom.*;<br>import org.jdom.input.*;<br>import org.jdom.output.*;</em></p></div>
<div><em> while(itr.hasNext()) <br> {<br> Element oneLevelDeep = (Element)itr.next();<br> if(oneLevelDeep.getName().equals("Plan"))<br> {<br> ID = oneLevelDeep.getAttributeValue
("ID");<br> float PID = Float.parseFloat(ID);<br> float NewPID = PID + 1;<br> String NewPIDString = Float.toString(NewPID);<br> Name = oneLevelDeep.getAttributeValue("Name");
<br> Plan.setAttribute("ID",NewPIDString);<br> Plan.setAttribute("Name",Name);<br> </em><em><font color="#ff0000"> /*goalText = oneLevelDeep.getChildTextNormalize("Goal");
<br> goal.setText(goalText);<br> Plan.addContent(goal);*/<br> //Plan.addContent((List)(Element) oneLevelDeep.getChildren().clone());<br> //Plan.getChild();<br></font> PlansGroup.addContent
((Element) Plan.clone());<br> }</em></div>
<div> </div>
<div>The red text show that I had problem there.</div>
<div>Thank you very much for your help.</div>
<div> </div>
<div>Regards,</div><span></span><span class="sg"><span></span><span>
<div>Normadiah Mahiddin</div></span></span>