---
title: "Problems accessing certain node reading xml with C#"  
description: "Problems accessing certain node reading xml with C#"  
author: "Jayden Bell"  
published: 2014-08-14  
updated: 2014-08-14  
canonical: https://www.mindstick.com/forum/2042/problems-accessing-certain-node-reading-xml-with-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Problems accessing certain node reading xml with C#

My [XML](https://www.mindstick.com/blog/203/working-with-xml-data-in-sql-server) looks like this:

```
<?xml version="1.0" encoding="UTF-8"?><configuration> 
<something.logger>    <add key="LoggerId"
value="8a2ff9ef-d144-4dcb-86d8-6ccaf44def20">    </add>    <add key="FederationId" value="00000000-0000-0000-0000-000000000000"
/> 
</something.logger> </configuration>
```

My [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii):

```
XmlDocument xml = new XmlDocument();xml.Load(Some-Valid-Path);XmlNodeList xnList =xml.SelectNodes("/configuration/something.logger");
```

I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to get the [Guid](https://www.mindstick.com/forum/12585/cast-the-value-returned-from-user-identity-getuserid-to-make-it-a-guid) (or [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages)..) of value.

In the [end](https://yourviews.mindstick.com/view/88503/us-iran-war-live-updates-trump-says-us-in-no-rush-to-end-iran-war) i want to get the [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) "8a2ff9ef-d144-4dcb-86d8-6ccaf44def20"

Thanks !

## Replies

### Reply by Pravesh Singh

Hi Jayden, Try this:\

XmlNodeList xnList = xml.SelectNodes("/configuration/something.logger/add/@value");


---

Original Source: https://www.mindstick.com/forum/2042/problems-accessing-certain-node-reading-xml-with-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
