当XML不包含名称空间时,例如,我具有按我想要的方式完美解析XML的代码,例如:
Set objXMLDoc = Server.CreateObject("MSXML2.DOMDocument.6.0")
objXMLDoc.async = False
objXMLDoc.setProperty "ServerHTTPRequest", True
objXMLDoc.Load ("XMLDOC.xml")
For Each xmlData In objXMLDoc.documentElement.selectNodes("shipments/Shipment")
Dim sender : sender = xmlData.selectSingleNode("shipmentId").text
Dim receiver : receiver = xmlData.selectSingleNode("consignor/name").text
'...code continues
但是当XML看起来像这样时该怎么做?
<wfs:FeatureCollection>
<gml:featureMembers>
<ltfr:LTFR_P_BUSS gml:id="LTFR_P_BUSS.257378">
<ltfr:FID>Data to pickup</ltfr:FID>
</ltfr:LTFR_P_BUSS>
</gml:featureMembers>
</wfs:FeatureCollection>