Beginner WPF/XML question: How to get an <element> in an <element>?

Posted by Niels on Stack Overflow See other posts from Stack Overflow or by Niels
Published on 2011-09-17T15:54:01Z Indexed on 2012/06/09 4:40 UTC
Read the original article Hit count: 317

Filed under:
|

I have a rather simple question. I'm trying to get information out of an XML file, and now I need to get the that's inside another

This is my XML code:

<author>
  <name>Random_name1 (Random Name)</name>
  <uri>http://thisisanrandomurl.com</uri>
</author>

I can get the info with this code:

Name = item.Element(ns + "author").Value,

But this gives me: "Random_name1 (Random Name) http://thisisanrandomurl.com"

I only want the info inside the tags. Any ideas?

Thanks a lot, - Niels

© Stack Overflow or respective owner

Related posts about wpf

Related posts about Xml