Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get past TXLife element in an ACORD XML file

Status
Not open for further replies.

batteam

Programmer
Sep 12, 2003
374
0
0
US
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top