我正在运行以下代码
Sub test()
'XML = "C:\R_20130408_1.xml" 'This is local, and works fine
XML = "http://www.treasurydirect.gov/xml/R_20130408_1.xml" 'This get nothing for "point"
Dim objXML As DOMDocument
Dim point As IXMLDOMNode
Set objXML = New DOMDocument
With objXML
.Load XML
Set point = .SelectSingleNode("//AuctionAnnouncement/CUSIP")
Sheets(1).Cells(2, 2) = point.Text
End With
End Sub
如您所见,如果我从网上下载这个 XML,我可以让它工作,否则,objXML 仍然会加载,但点什么都没有。
有人会对此提出一些想法吗?
非常感谢!姬