| Author |
comparing 2 xml files
|
kesava chaitanya
Ranch Hand
Joined: Aug 15, 2001
Posts: 140
|
|
old.xml <EmployeeDetails> <Employee recordNo="1"> <empNo>1</empNo> <empName>Ch.Srinivas</empName> <empDisig>Software Engineer</empDisig> <empSal>1000.0</empSal> </Employee> <Employee recordNo="2"> <empNo>2</empNo> <empName>sampath</empName> <empDisig>se</empDisig> <empSal>2222.0</empSal> </Employee> </EmployeeDetails> new.xml <EmployeeDetails> <Employee recordNo="1"> <empNo>1</empNo> <empName>Ch.Srinivas</empName> <empDisig>Software Engineer</empDisig> <empSal>1000.0</empSal> </Employee> <Employee recordNo="2"> <empName>sampath</empName> <empDisig>se</empDisig> <empSal>2222.0</empSal> </Employee> </EmployeeDetails> in new.xml <empNo>2</empNo> of recordno="2" is not there; i will compare all nodes in 2 xml files;whatever nodes r not there in new.xml those nodes will pick up from old.xml and should be placed exact position in new.xml; in new.xml if record="1" node is not there whole node should be placed in new.xml before recordno="2" node ; i am using XPATH API of xalan and DOM; [ July 20, 2004: Message edited by: kesava chaitanya ]
|
 |
 |
|
|
subject: comparing 2 xml files
|
|
|