【发布时间】:2016-12-14 15:26:18
【问题描述】:
例如,我需要检查“Charrizard”是否存在,我在网上四处寻找,但只找到了 xElement 属性值和子节点示例。
<pokemons>
<pokemon>
<color>red</color>
<name>Charrizard</name> //the content is named value right ??
</pokemon>
</pokemons>
我在某处看到它的开头是这样的:
XDocument doc = XDocument.Load("pokemons.xml");
bool b = doc.Descendants(but don't know how to access the value.)..
【问题讨论】: