Get all the attribute value of a particular node from the XML File

Kosaki

New Member
I have created an xml file like below \[code\]<Engagements><User name ="jjjj"><Engagement id="1111"/></Engagement></Username><Username ="kkkk"><Engagement id="2222"/></Engagement></User></Engagements>\[/code\]I need to get all the id of the Engagement node. How can i possible this?This is what I currently have:\[code\]public static void ParseXml(XmlDocument xmlFile) { XmlNodeList nodes = xmlFile.SelectNodes("//Engagement"); foreach (XmlNode node in nodes) { // What goes here? } } \[/code\]
 
Back
Top