开发者

Diff function Flex

I am looking for a way to compare two XML files (old and new) and copy to an array all the nodes that are present in the new version but not the old version. I think it should be relatively straight forward to, for each node in the new XML file, iterate through the old XML file and see if it's found ... however, I do not think this is an efficient solution for large XML files (<10k nodes). I a开发者_开发百科m wondering if there is a better solution - either algorithmic or function in Flex - to accomplish this task.

Thanks for all the assistance!


Jackson Dunstan has recently tested XML performance and found it indeed slow, even for access. Alternatives are nested Objects or Dictionaries containing XML data - but you must build them from XML once it is parsed, and this is not justified for a single pass. Or parse it yourself - but I'm not sure how much faster that would be, even with Alchemy.


I'd look into algorithms which SVN merge tools use and use one those on the raw text, create an XML out of the diff and only parse that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜