私のXMLは次のとおりです。LINQ-to-XMLのInnerTextと同等のものは何ですか?
<CurrentWeather>
<Location>Berlin</Location>
</CurrentWeather>
私は、文字列「ベルリン」をしたい、どのように、要素場所のうち、InnerTextプロパティのようなものを内容を得るのですか?
XDocument xdoc = XDocument.Parse(xml);
string location = xdoc.Descendants("Location").ToString();
上記戻り、あなたの特定のサンプルについては
System.Xml.Linq.XContainer + d__a
、私は「使用していたが判明しましたSystem.Xml.Linq "しかし、" System.Linqを使用して "忘れてしまった、ありがとう。 –
np、それは起こる:) –