I am trying to select all the child nodes of root node of an xml document using XPath query.
My xml file looks something like following :
You can use GetElementsByTagName method below are the snippet of my code
XmlDocument gazetteDocument = new XmlDocument(); gazetteDocument.Load(xmlFilePath); XmlNodeList allNodes = gazetteDocument.GetElementsByTagName("root");