3
XmlReader(long story)から完全なXml文字列を取得する必要があります。このサンプルコードでは、最後の変数、XmlStringは空のままです。なぜXML文字列が割り当てられないのですか?XmlReaderが空の文字列を返すのはなぜですか?
string xmlConfig = @"<pdfMappings>
<pdfFile formTypeEnum=""Int_UT_Additional_Investment_Form_Ind_And_LE_direct"">
<perspective ngiAdminPerspectiveName=""Investor"">
<fieldMapping fieldName=""topmostsubform[0].Page2[0].first_names[0]"" mapTo=""CurrentInvolvedParty.FirstName""></fieldMapping>
<fieldMapping fieldName=""topmostsubform[0].Page2[0].surname[0]"" mapTo=""CurrentInvolvedParty.LastName""></fieldMapping>
</perspective>
</pdfFile>
</pdfMappings>";
var reader = XmlReader.Create(new StringReader(xmlConfig));
string theXmlString = reader.ReadOuterXml();
そのように簡単です。おかげでrRrRrRr – willem