【发布时间】:2016-04-06 13:38:30
【问题描述】:
我正在通过 XDocument 解析 XML,如何检索所有语言,即 <en> 或 <de> 或 <CodeCountry> 及其子元素?
<en>
<descriptif>In the historic area, this 16th century Town House on 10,764 sq. ft. features 10 rooms and 3 shower-rooms. Period features include a spiral staircase. 2-room annex house with a vaulted cellar. Period orangery. Ref.: 2913.</descriptif>
<prox>NOGENT-LE-ROTROU.</prox>
<libelle>NOGENT-LE-ROTROU.</libelle>
</en>
<de>
<descriptif>`enter code here`In the historic area, this 16th century Town House on 10,764 sq. ft. features 10 rooms and 3 shower-rooms. Period features include a spiral staircase. 2-room annex house with a vaulted cellar. Period orangery. Ref.: 2913.</descriptif>
<prox>NOGENT-LE-ROTROU.</prox>
</de>
...
<lang>
<descriptif></descriptif>
<prox></prox>
<libelle></libelle>
</lang>
【问题讨论】:
-
有时我有
或 或 ,我必须拥有所有语言, 是动态应答 -
xml根目录下都是
节点吗?是否有任何不是 的 兄弟? -
我已将您问题的文本拉到代码块上方,这使回答者更容易扫描问题并思考答案 - 这是一种称为“底线在前”的技术。希望它可以帮助您获得您正在寻找的答案。