Query an XML file - C#

Asked

Viewed 443 times

2

I have an application in windows phone 8.1 where an XML file is displayed in a listBox, and in this application has a textbox for the user to search the content that is displayed by listbox.

My question is this: how do I make this query, so that select covers all tags in my document?

2 answers

1


You can make a select using Linnum, as follows:

var query = from element in root.Elements
where (string)element.Attribute ("atr") == "search" 
select element;

My example is a very simple query because, as you have not posted the code you already have, I do not know what your real need.

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.