I'm newbie to java xml programming. I'm finding difficulties to
finish one of my task.
I have 2 xml files. One xml file has got some extra procesing
instructions than the other one. I have to find the position of those
PI's from xml1 and insert on the same level on the xml2.
I tried to export the xpath of those PI's from the xml1. And search
for the xpath exp in the xml2 and create the PI's.
But somehow it is not working any help??
xml1.xml
<?xml version='1.0'?>
<root>
<title>Title</title>
<head>
<para>Text in</para>
<para>Text <emp>Hello</emp><?hello world?> in</para>
<para>Text in</para>
<para>Text in</para>
<para>Text in</para>
<?hello world?>
<para>Text in</para>
<para>Text in</para>
<para>Text in<?hello world?></para>
</head>
</root>
xml2.xml
<?xml version='1.0'?>
<root>
<title>Title</title>
<head>
<para>Text in</para>
<para>Text <emp>Hello</emp> in</para>
<para>Text in</para>
<para>Text in</para>
<para>Text in</para>
<para>Text in</para>
<para>Text in</para>
<para>Text in</para>
</head>
</root>