EDN Admin
Well-known member
Hi together,
in a given XML:
<pre lang="x-xml <xml>
<item>
<id>1</id>
<data type="up"/>
<data type="down"/>
<data type="left"/>
</item>
<item>
<id>2</id>
<data type="down"/>
</item>
<item>
<id>3</id>
<data type="down"/>
<data type="left"/>
</item>
<item>
<id>4</id>
<data type="up"/>
<data type="down"/>
<data type="left"/>
</item>
</xml>[/code]
How can i retrieve with a LinqToXML query all "item" nodes which not contains a child node "data" where its attribute "type" has the value "up"?
Thanks in advance,
el-gokulo
View the full article
in a given XML:
<pre lang="x-xml <xml>
<item>
<id>1</id>
<data type="up"/>
<data type="down"/>
<data type="left"/>
</item>
<item>
<id>2</id>
<data type="down"/>
</item>
<item>
<id>3</id>
<data type="down"/>
<data type="left"/>
</item>
<item>
<id>4</id>
<data type="up"/>
<data type="down"/>
<data type="left"/>
</item>
</xml>[/code]
How can i retrieve with a LinqToXML query all "item" nodes which not contains a child node "data" where its attribute "type" has the value "up"?
Thanks in advance,
el-gokulo
View the full article