XMLConfiguration setProperty(), then save() corrupts and deletes XML nodes
--------------------------------------------------------------------------

                 Key: CONFIGURATION-386
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-386
             Project: Commons Configuration
          Issue Type: Bug
    Affects Versions: 1.6
         Environment: Windows XP, latest Eclipse, Configuration 1.6
            Reporter: Daniel Hurwitz


When using XMLConfiguration to input an XML file, after performing 
setProperty(), then save() to a new output file, some nodes near the end of the 
file are removed and I notice some nodes are split, as demonstrated below:

original XML:
<A>
  <B> w1 w2 w3 w4 w5</B>
  <C> v1 v2 v3 </C>
</A>

after doing setProperty("A.C","changes"), then save():
file contains:
<A>
   <B> w1 w2 </B>
   <B> w3 w4 </B>
   <B> w5 </B>
</A>

Note: If I input the XML and immediately save() it without using setProperty() 
to make a change, the new output file looks identical to the original. There 
are about 500 <A> constellations. In the latter 15 or so, the C nodes are 
removed in the new output XML. Also, It doesn't make sense to me why it would 
split the <B> into a few. Could the encoding of the XML affect the 
setProperty() method? I ask because the <C> nodes contain Hebrew letters. Yet 
that's interesting that it works, except for removing the latter 15 or 20 <C> 
nodes.
Any thoughts on how to resolve this? Thanks in advance!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to