<Root> <VehicleInfo> <VINInfo /> </VehicleInfo> <ComparableVehicles> <VehicleInfo> <VINInfo> <VIN> <VINNum>Something</VINNum> </VIN> </VINInfo> </VehicleInfo> </ComparableVehicles> </Root>I use this method to verify if a XML node exist:
' See if a node exists ' expC1 Node Public Function IsXMLNode(ByVal tcNode As String) As Boolean ' Select the node If oXmlNameSpaceManager Is Nothing Then oXmlNode = oXmlDocument.SelectSingleNode(tcNode) Else oXmlNode = oXmlDocument.SelectSingleNode(tcNode, oXmlNameSpaceManager) End If ' See if we obtained the node If oXmlNode Is Nothing Then Return False End If Return True End FunctionI use this code to verify if a specific XML node exists:
' If we have the //VehicleInfo/VINInfo/VIN/VINNum If loXml.IsXMLNode("//VehicleInfo/VINInfo/VIN/VINNum") Then End IfAnd, it does find it. However, that branch is not under the root but under ComparableVehicles. Why does it find it?