Question: I have this XML:

```
<?xml version="1.0" encoding="utf-8"?>
<!-- Report generated by xxx -->
<report AppKey="stuffs" AppId="123">
  <physician name="AAA BBB">
     ....
     <services>
       <service id="1" diagnostic="345" />
       <service id="2" diagnostic="253" />
       <service id="3" diagnostic="585" />
     ....
     </services>
  </physician>
</report>

```

and this c# code

```
XmlDocument doc = new XmlDocument();
doc.Load(file);
XmlNodeList xnList = doc.SelectNodes("/report/physician/services/*");

```

My problem is that the xnList is always empty, I tried with `"/report/*"` which return 0, tried with `"/report/physician/*"` which returns the same, only `"*"` returns the entire xml file. What I want to do is to select every `<service>` and then get their attributes. I cant seem to find a way to get every service element, because my queries always return nothing.

Answer: 
Remove the asterisk;

```
XmlNodeList xnList = doc.SelectNodes("/report/physician/services/service");

foreach (XmlNode service in xnList)
    x = service.Attributes["id"].Value;

```
This should select all service elements, no matter where they are in the file:

```
XmlNodeList xnList = doc.SelectNodes("//service");

```

Click [here](http://www.w3schools.com/xpath/xpath_syntax.asp) to find more XPath expressions