You could traverse both DOM tree and on each step you check that the two nodes have the same type.
If the node is an element, compare names and attribute maps.
If the node is a text element, also compare text.
Or read both files into DOM trees and then write them to two temporay files or buffers and then compare their content.
Cheers,
_





Reply With Quote

Bookmarks