XmlDocument.SelectNodes() XPath Query Returns Null

by dcurtis 4/12/2009 6:39:00 AM
I've been working on a project that required me to download a feed from a site and load it into a table.  I began pulling my hair out when trying to loop through the nodes of the XML--the only time I could retrieve any nodes via an XPath query was if I used "/*"--if I tried to name the nodes, I would always get nothing in return.  I performed several different searches and didn't find anything that addressed the issue.  Finally, I found something that appeared to be related here.  While this post was talking specifically about an MSBuild project file, I noticed a similarity between my issue and the MSBuild issue--both had an xmlns attribute issue.  Once I used the XmlNamespaceManager to add a namespace to the document, all of my XPath queries started to return values. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

ASP.NET 2.0

New Site: www.gliffik.com

by dcurtis 4/2/2009 10:49:00 AM

I site that I've been working on in collaboration with Ideas Collide Marketing Communications went live last night--www.gliffik.com.

 Check it out.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Derek Curtis Derek Curtis
President, Plaid Pony Technology Solutions LLC

E-mail me Send mail

Calendar

<<  November 2017  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Pages

    Recent comments

    Authors

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2017

    Sign in