开发者

XPath and XNodes vs Xelements, whats better for mapping two large xml documents?

I want to map two fa开发者_开发技巧irly large xml documents, one of them using the NIEM schema. I am most familiar with the System.Xml.Linq (XElement) class but have heard good things about using XPath and XNodes, contained in the System.Xml namespace.

Anyone have any pros and cons on the two in terms of mapping?


I think the main issue (as you have large XML documents) is whether you need write access or not. If you're mapping from one file to a new file you can use an XmlReader which gives only forward read only access to the xml document but it is really fast.

I would say however that using XPath is less intuitive than XElement as most programmers are familiar with Linq syntax but not everyone might be familiar with XPath queries.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜