I have 2 xml files named 1k.xml and 1n.xml. The contents are similar except for the text in one element.
The file 1k.xml contains some additional elements and data which are not there in 1n.xml. I want to copy whatever is absent in 1n.xml to it, so that both the files are identical except for the text in one element.
1k.xml
<verse>
<verse-no>...</verse-no>
<section>...</section>
<verse-content>...
</verse-content>
</verse>
1n.xml does not have the section element and the verse-content of 1n.xml is different from 1k.xml.
- All verses do not have
section. Thesectionmust be inserted in the correct place - just above theverse-contentof the correctverse-number. - There is one more element called
quotewhich is absent in1n.xmlwhich also need to be copied to it.
Is there a software to do this? Can I do it using perl or java (as I have experience only in these two)? Please point me to some tutorial or way through which I can synchronize these two files in every aspect except for the verse-content data.
Aucun commentaire:
Enregistrer un commentaire