我有这个 XML
<config>
<audio first="true" second="false" third="true" />
</config>
我希望我的代码能够像这样做某事
if (xdoc.getAttr("first")=="true")
Console.Write("first is true");
我如何使用LINQ XDocument实现这个功能?目前我已经用该XML字符串加载了XDocument对象。
我有这个 XML
<config>
<audio first="true" second="false" third="true" />
</config>
我希望我的代码能够像这样做某事
if (xdoc.getAttr("first")=="true")
Console.Write("first is true");
我如何使用LINQ XDocument实现这个功能?目前我已经用该XML字符串加载了XDocument对象。