Team - had an issue with Access VBA - got Access denied error. I seem to have resolved it with further help from other posts. This code lets extract an XML and read its attributes. I have reduced the code as am not able to post otherwise:
Sub test()
Dim Queue As String
Dim aid As String
Dim tp As String
...
DoCmd.SetWarnings False
Dim xmlhttp As MSXML2.xmlhttp
Dim xmldoc As MSXML2.DOMDocument
Dim XMLNodes As MSXML2.IXMLDOMNodeList
Dim xmlElement As MSXML2.IXMLDOMElement
Dim bookTitle As String
' Fetch the XML
Set xmlhttp = CreateObject("Microsoft.xmlHTTP")
xmlhttp.Open "Get", "http://....xml", False
xmlhttp.send
' Create a new XMLDocument to which to load the XML text
Set xmldoc = New DOMDocument
xmldoc.loadXML (xmlhttp.responseText)
For Each n In xmldoc.selectNodes("*")
ts = n.Attributes.getNamedItem("ts").Text
Next
For Each n In xmldoc.selectNodes("//myNode")
Queue = n.Attributes.getNamedItem("cq").Text
aid = n.Attributes.getNamedItem("id").Text
tp = n.Attributes.getNamedItem("tp").Text
astate = n.Attributes.getNamedItem("as").Text
rc = n.Attributes.getNamedItem("rc").Text
i = i + 1
Next
DoCmd.SetWarnings True
End Sub