我想读取这个 xml 的值。例如获取 *ram:Receive_Time* 的值。
<?xml version="1.0"?>
<rsm:BidNoticeInformationDocumentResponse xmlns:rsm="urn:mn:org:eppd:data:standard:BidNoticeInformationDocumentResponse:1" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:9" xmlns:ram="urn:mn:org:eppd:data:standard:ReusableAggregateBusinessInformationEntity:1" xmlns:sbd="urn:mn:org:eppd:data:standard:BidNoticeInformationResponse:1" xmlns:bdh="urn:mn:org:eppd:data:standard:BusinessDocumentHeaderSchemaModule:1" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mn:org:eppd:data:standard:BidNoticeInformationDocumentResponse:1..\Schema\DocSchema\BidNoticeInformationProxy.xsd">
<bdh:BusinessDocumentHeader>
<bdh:ResultDocument>
<ram:Receive_Time>2013-06-12 11:03:06</ram:Receive_Time>
<ram:Result_Code>0000</ram:Result_Code>
<ram:Result_Message>SUCCESS</ram:Result_Message>
<ram:TransmissionID>K20130612110301SSSSS</ram:TransmissionID>
</bdh:ResultDocument>
</bdh:BusinessDocumentHeader>
<sbd:BidNoticeInformationResponse>
<sbd:BidNoticeDocument>
<ram:Name>Test Bid(Bid Number : 20110300001-00)</ram:Name>
....
我试过这个方法。但是价值越来越空。
Dim xmlDoc As New XmlDocument()
xmlDoc.Load("BidNoticeInformationResponse.xml")
'MsgBox(xmlDoc.InnerXml)
Dim sr As New System.IO.StringReader(xmlDoc.InnerXml)
Dim doc As New Xml.XmlDocument
doc.Load(sr)
Dim reader As New Xml.XmlNodeReader(doc)
While reader.Read()
If (reader.IsStartElement) Then
If (reader.Prefix & ":" & reader.LocalName = "ram:Receive_Time") Then
MsgBox(reader.Value)
End If
End If
End While