Click here to Skip to main content
12,301,374 members (60,130 online)

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 | Mobile
Web02 | 2.8.160525.2 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid