Hello,I have been trying to store an xml attribute value to a string and I cannot seem to get it to work. I start off pulling an XML node from a SharePoint web service.
XmlNode user = usergrpService.GetUserInfo("domain\\user");
This seems to work because if I assign user.InnerXml to a text box then I can see the contents of the user. So then I try to get the value.I have tried a combination of the following with /'s, @'s, User/ID, User@ID, /User/ID, /User@ID, etc.
String userID = user.Attributes["ID"].Value;
String userID = user.SelectSingleNode("ID").Value;
Each time I get an "Object reference not set to an instance of an object" error. If I can read the InnerXml then why can I not get a single attribute?-Eric
View Complete Post