0

I need to compare two xml documents for equality, just as described in this post: How would you compare two XML Documents? The Xml Diff API would be fantastic, but unfortunately it can't be referenced in Silverlight.

Anybody know of a similar solution for silverlight?

Community
  • 1
  • 1
AyKarsi
  • 9,435
  • 10
  • 54
  • 92

1 Answers1

0

Well, without the use of a library, I would - employ a depth first search on the source document, associate an xpath with each leaf encountered and place that xpath with it's associated value on a stack. (most likely some xpath custom class for path and value). (the option of a dictionary is there too. :) ). Once the depth first search is completed, I would pop each element of the stack off, execute the X-path on the destination document, and once a disparity in the xpath values are encountered - consider the documents unequal.
Just a theoretical suggestion.

Neel Edwards
  • 308
  • 3
  • 7