If I edit an item in the tree and then serializing, the xml

If I edit an item in the
tree and then serializing, the xml-code will contain incorrect syntax.

Here is an example:

<item id=“84” 
select=“1” text="<input
class=“intreeeditRow” 

value=“REFERENSER” type=“text”>">

You
must stop edit before serialization.

                tree.stopEdit();

                var z=tree.serializeTree();