I am trying to parse a XML file transmitted in ACORD format. XML files in this format have a standard first, 'root' element of TXLife. These files then have an element named OLifE, where child nodes under it contain all the data particular to the file. My problem is, when attempting to loop thru my file, my code stops after looping thru the TXLife element and does not continue thru the childnodes under OLifE, where my data is.
Does anyone have experience parsing a ACORD standard XML file? Once I get into the OLifE nodes, I believe I can get the data I want. I am using VBA, behind an MSAccess 2007 form. Using XML 4.0 reference. Thanks for any help you can provide. A snippet of my code is:
Dim myXMLDoc As MSXML2.DOMDocument40
Set myXMLDoc = New MSXML2.DOMDocument40
Dim ClaimList As IXMLDOMNodeList
Dim MyItem As IXMLDOMElement
Dim MyChild As IXMLDOMElement
Dim varA As String, varB As String
myXMLDoc.Load ("H:\aaaaa.xml")
Set ClaimList = myXMLDoc.documentElement.ChildNodes
For Each MyItem In ClaimList
For Each MyChild In MyItem.ChildNodes
varA = MyChild.nodeName
varB = MyChild.Text
Next
Next
Set myXMLDoc = Nothing
Set ClaimList = Nothing
Does anyone have experience parsing a ACORD standard XML file? Once I get into the OLifE nodes, I believe I can get the data I want. I am using VBA, behind an MSAccess 2007 form. Using XML 4.0 reference. Thanks for any help you can provide. A snippet of my code is:
Dim myXMLDoc As MSXML2.DOMDocument40
Set myXMLDoc = New MSXML2.DOMDocument40
Dim ClaimList As IXMLDOMNodeList
Dim MyItem As IXMLDOMElement
Dim MyChild As IXMLDOMElement
Dim varA As String, varB As String
myXMLDoc.Load ("H:\aaaaa.xml")
Set ClaimList = myXMLDoc.documentElement.ChildNodes
For Each MyItem In ClaimList
For Each MyChild In MyItem.ChildNodes
varA = MyChild.nodeName
varB = MyChild.Text
Next
Next
Set myXMLDoc = Nothing
Set ClaimList = Nothing