XPathDocument document = new XPathDocument("source.xml"); // Navigator gets you XPath access to the document. XPathNavigator navigator = document.CreateNavigator(); XmlNamespaceManager namespaces = new XmlNamespaceManager(navigator.NameTable); // Can define as many as you like, but you need at least one. namespaces.AddNamespace("n", "namespace for elements"); // Go go go, XPath! // Get the contents of the inside the . string textContents = (string)xpathNav.Evaluate("string(/n:rootElement/n:anotherElement)", namespaces); // Get the numeric valid of the 'foo' attribute on the (XPath 'number' is a double, hence two casts). int fooValue = (int)(double)subEventNav.Evaluate("number(/n:rootElement/n:anotherElement/@foo)", namespaces);