Xerces: How to merge duplicate nodes?
My question is:
If I have the following XML:
<root>
<alpha one="start">
<in>1</in>
</alpha>
</root>
and then add the following path:
<root><alpha one="start"><out>2</out></alpha></root>
that leads to
<root>
<alpha one="start">
<in>1</in>
</alpha>
</root>
<root>
<alpha one="start">
<out>2</out>
</alpha>
</root>
I want to be able to convert it to this:
<root>
<alpha one="start">
<in>1</in>
<out>2</out>
</alpha>
</root>
Besides the fact that he himself was implementing (today I do not want to reinvent the wheel), is there a concrete way in Xerces (2.8, C ++) to do this?
If so, at what point in the DOMDocuments node merge is done? with each insert? when writing a document, explicitly on request?
Thanks.