Questions

What is syntax for Namespace object in VBA?

+
0 Votes
Locked

What is syntax for Namespace object in VBA?

william.beissel
I have been tasked with parsing a rather large XML file. It contains certain data within its elements that I need to display on an Access Project form. I am having great difficulty getting the correct code / snytax to set the file's NameSpace and 'MakeTable' objects and properties. Can anyone provide some assistance / samples on how this can be done, again in VBA, not VB? A sample of what I have so far is, but of course is not correct.

Dim varString As String, varStringB As String
Dim doc As MSXML2.DOMDocument
Set doc = New MSXML2.DOMDocument

'Doc.NamespaceURI = ("http://ACORD.org/Standards/Life/2")
doc.async = False
doc.Load ("H:\CSXPLUSIIT.xml")
Dim topNode As MSXML2.IXMLDOMElement
Set topNode = doc.documentElement

Dim nsmgr As IXMLDOMNode
nsmgr.NamespaceURI = ("http://ACORD.org/Standards/Life/2")

doc.SetProperty "SelectionLanguage", "XPath"
For Each RequirementInfo In doc.SelectNodes("//*")
varString = RequirementInfo.SelectSingleNode("RequirementDetails").Text & "<br>" 'Response.Write book.SelectSingleNode("title").Text & "<br>"
'varStringB = VendorApp.SelectSingleNode("Pswd").Text & "<br>"
Next
etc...