S
SV
I have two input XML files. One lists all the expected elements
(default.xml) with default values and the other is the actual data
(data.xml). For any elements that are missing in data.xml, I want to
copy them from all.xml and put it in the resulting OUTPUT document
default.xml
<CLOTHES>
<JEANS>unknown/JEANS>
<SHIRTS>unknown</SHIRTS>
<TOPS>missing</TOPS>
<SWIMSUITS>missing</SWIMSUITS>
</CLOTHES>
data.xml
<CLOTHES>
<JEANS>xxx</JEANS>
<SHIRTS>yyy</SHIRTS>
<TOPS>zzz</TOPS>
</CLOTHES>
OUTPUT should look like this:
<CLOTHES>
<JEANS>xxx</JEANS>
<SHIRTS>yyy</SHIRTS>
<TOPS>zzz</TOPS>
<SWIMSUITS>missing</SWIMSUITS>
</CLOTHES>
How do i do this?
Thanks,
SV
(default.xml) with default values and the other is the actual data
(data.xml). For any elements that are missing in data.xml, I want to
copy them from all.xml and put it in the resulting OUTPUT document
default.xml
<CLOTHES>
<JEANS>unknown/JEANS>
<SHIRTS>unknown</SHIRTS>
<TOPS>missing</TOPS>
<SWIMSUITS>missing</SWIMSUITS>
</CLOTHES>
data.xml
<CLOTHES>
<JEANS>xxx</JEANS>
<SHIRTS>yyy</SHIRTS>
<TOPS>zzz</TOPS>
</CLOTHES>
OUTPUT should look like this:
<CLOTHES>
<JEANS>xxx</JEANS>
<SHIRTS>yyy</SHIRTS>
<TOPS>zzz</TOPS>
<SWIMSUITS>missing</SWIMSUITS>
</CLOTHES>
How do i do this?
Thanks,
SV