如何添加新节点,更新现有节点并删除XML文档的现有节点,而无需在内存中加载整个文档?如何在不将整个文档加载到内存中的情况下使用Xml文件?
我有一个xml文档,并将其视为我的应用程序的内存,因此需要能够在不加载整个文档的情况下快速执行数百次读取和写入操作。
它的结构是这样的:
<spiderMemory>
<profileSite profileId="" siteId="">
<links>
<link>
<originalUrl></originalUrl>
<isCrawled></isCrawled>
<isBroken></isBroken>
<isHtmlPage></isHtmlPage>
<firstAppearedLevel></firstAppearedLevel>
</link>
</links>
</profileSite>
</spiderMemory>
怎么会是这样可能的的XDocument?
感谢
这可能会有所帮助:http://stackoverflow.com/questions/1797167/processing-xml-without-loading-entire-document-in-memory –