Thanks in advance
Thanks in advance
William Brogden wrote:Are you testing for identity of the two files in the Infoset sense, or trying to spit out all content differences?
Note that for things like attributes in an Element, two documents may have a different text order but be considered identical XML. And of course an empty elment tag is considered identical to an open and close tag pair with no content.
Exactly what you have to detect makes a big difference.
Bill
Thanks in advance
I need to find the logical differences of the content(data part) between the files.
Joybrata Chakraborty wrote:I need to find the logical differences of the content(data part) between the files.
William Brogden wrote:
I need to find the logical differences of the content(data part) between the files.
OK, next questions:
Are the differences only in the content of a single Element - say the Text Node content of a "FirstName" Element or are the differences potentially more complex?
If the order of elements changes, but not the content, is that a change you want to detect?
How complex is the hierarchy of XML within the files? A relatively "flat" hierarchy should be easier to examine. The most extreme example would be a document with nothing but elements like:
<Book isbn=xxxx" >Sometext description</Book>
In a more complex hierarchy, <Book might be inside ><Section inside ><Library inside ><City inside ><State ... well you get the idea.
Bill
>
Thanks in advance
Paul Clapham wrote:
Joybrata Chakraborty wrote:I need to find the logical differences of the content(data part) between the files.
It would be helpful if you used XML terminology. For example, what is this "data part" you are asking about? The entire XML document is data, so you seem to be using some non-XML idea where you divide your document into "data" and something else.
Thanks in advance
I am trying to write the code using java reflection. Any suggestion is welcomed on that.
Joybrata Chakraborty wrote:
Paul Clapham wrote:It would be helpful if you used XML terminology.
Thanks for correcting me, values of these tags need to be compared.