<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1226" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>With JDOM Beta 8, I 
could get a List of elements, then set by index a new 
element.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>Now with Beta 9, it 
doesn't seem to get properly set.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>I've verified this 
by going back and fourth with different versions of JDOM, but the same source 
code.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=078480120-25092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=078480120-25092003>e.g.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>Element 
partlist_element = root.getChild("PartList");</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>List partlist = 
partlist_element.getChildren("Part");</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>//... I search 
partlist for the index of the old element I want replaced</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>//... I generate 
it's new replacement, new_part_element</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>// then I try to add 
it... replacing my old element</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>partlist.set(index, 
new_part_element);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>// the above no 
longer seems to set the new_part_element (and it's 
sub-elements)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=078480120-25092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>// a temp fix that 
works for JDOM Beta 9 is (but it shouldn't be required)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>&nbsp;&nbsp;&nbsp; 
partlist_element.setContent(partlist);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>OR using deprecated 
methods</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>&nbsp;&nbsp;&nbsp; 
partlist_element.removeChildren();</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>&nbsp;&nbsp;&nbsp; 
partlist_element.setChildren(partlist);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003></SPAN></FONT><FONT 
face=Arial size=2><SPAN class=078480120-25092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003>//... then I write 
the tree back out to my XML file</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=078480120-25092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=078480120-25092003></SPAN></FONT><FONT 
face=Arial size=2><SPAN class=036154723-09112000></SPAN></FONT>&nbsp;</DIV>
<DIV align=left>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=036154723-09112000></SPAN></FONT>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=036154723-09112000>v/r,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=036154723-09112000></SPAN></FONT><FONT 
face=Arial color=#000080><STRONG><EM>Licinio "Lou" Alves</EM></STRONG></FONT> 
</DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>Email: 
AlvesLS@Npt.NUWC.Navy.mil</FONT><FONT face="Times New Roman" size=3> 
</FONT><BR></FONT></DIV></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>