SelectNodes requires XmlNamespaceManager when XML Schema file has a default namespace attribute.
Visual Studio .NET will create an XML Schema file for an open xml file (see XML menu). This adds a default namespace to the root element of the xml document which has the side effect of breaking unqualified xpath SelectNodes() queries. The solution is to use a name space manager with the SelectNodes() calls. Add the default namespace to the XmlNamespaceManager and give it a prefix. Use this prefix in the xpath query string.
Used XmlDocument to parse an input xml file.
Used XmlTextWriter (and StringWriter) to write an output xml file.
Used Hashtable to temporarily map names to references while building simple arrays of references.