Пытаюсь найти элементы `complexType` в XSD документе через `XPath`.
Но явно не понимаю как работаю неймспейсы и как настроить `XmlNamespaceManager`
_document = New XmlDocument()
_document.Load(current_xsd)
Dim nsmgr As XmlNamespaceManager = New XmlNamespaceManager(_document.NameTable)
nsmgr.AddNamespace("xs", "http://common")
Dim nodeList As XmlNodeList = _document.SelectNodes("//complexType", nsmgr)
For Each node As XmlNode In nodeList
Next
Часть документа:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Catalog" targetNamespace="http://catalog" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xc="http://common" xmlns="http://catalog">
<xs:import namespace="http://common" schemaLocation="Common.xsd"/>
<xs:complexType name="brigade">
<xs:complexContent>
<xs:extension base="xc:extraFieldContainer">
<xs:sequence>
<xs:element name="brigadier" type="staffPersonnelNumber" minOccurs="1" maxOccurs="1"/>
<xs:element name="employees" type="employeCollection" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>