我有像这样XDocument.Load失去宣言
<?xml version="1.0" encoding="us-ascii"?>
<AutomatedDispenseResponse>
<header shipmentNumber=""></header>
<items></items>
</AutomatedDispenseResponse>
一个XML模板文件,当我使用XDocument.Load,由于某种原因,
<?xml version="1.0" encoding="us-ascii"?>
被丢弃。
如何将文件加载到XDocument中而不会丢失顶部的声明?
我发现不久后发布(当然)。自从它调用ToString()以来,intellisense就抛弃了我。我只需要做一些像http://stackoverflow.com/questions/957124/how-to-print-xml-version1-0-using-xdocument/957161#957161 – Kenoyer130 2010-08-05 14:30:54