Re: [xsl] Simple XML Diff

Subject: Re: [xsl] Simple XML Diff
From: Mark Anderson <mark.anderson@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 13 Jul 2008 13:54:26 +0100
Hi Michael

Thanks a lot for the answer. I'm almost there. But have two remaining
problems. Each node may contain elements with the same name and there are
about 10,000 nodes, so I need to differentiate between them, e.g.

<node1>
        <name>John</name>
</node1>

<node2>
        <name>Fred</name>
</node2>

The example you provided produces a nodeset of:
node1
name
node2
name

In my output, I need to differentiate between node1/name and node2/name. Is
there a way to get the full path of the current element so I output contains
the path as well as the element name?

Secondly, if a node has children, the entire RTF is tested. For example,

<node1>
        <node11>
                <node111>111</node111>
                <node112>222</node112>
                <node113>333</node113>
                <node114>444</node114>
        </node11>
</node1>

The above will compare "111 222 333 444" with equivalent RTF in the second
XML, but I need to know if just /node1/node11/node111 differs in the two
files. It does actually test these individually as it descends the tree, but
is there a way to omit RTF's containing more than one node

Regards

Mark

Current Thread