Click here to Skip to main content
13,549,174 members

Comments by Matthew Hazlett (Top 1 by date)

Matthew-Hazlett 24-Nov-10 17:45pm View
You might want to revisit this. The entire top part of this code is not even used. You create an xml element just to blow it away a few lines later.

Then this line:
XmlNodeList credentials = xmlDocument.DocumentElement.SelectNodes("/Credentials/Credential");

Should be:
XmlNodeList credentials = xmlDocument.SelectNodes("//Credentials/Credential");

A single slash in an xPath means to return only one result. If there is only one node that ever gets returned then the foreach line under it makes no sense.

There are so many more issues with what you posted. It looks like you stole code from various sources, cut and pasted it together without really understanding anything at all about what you are doing.

Advertise | Privacy |
Web02-2016 | 2.8.180515.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid