Click here to Skip to main content
11,714,345 members (82,894 online)

Comments by Matthew Hazlett (Top 1 by date)

Matthew Hazlett at 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
Web03 | 2.8.150819.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid