Forum Discussion
JBLT-77
Jun 04, 2022Iron Contributor
Problems Importing XML Files Into Access
I'm trying to import several XML files into Microsoft access. When I use the XML import wizard however, access imports the XML file creating multiple tables, rather than a single table where each re...
tsgiannis
Jun 06, 2022Iron Contributor
If you want total control with XML you need to do it via code.
Something like that
Set xmlDoc = New MSXML2.DOMDocument
intFile = FreeFile()
Open strXMLFilename For Input As intFile
strXMLFile = input$(LOF(1), 1)
Close intFile
Set xmlDoc = CreateObject("MSXML2.DOMDocument.6.0")
xmlDoc.LoadXML strXMLFile
Then you will iterate its nodes..grab the values and place them accordingly
Something like that
Set xmlDoc = New MSXML2.DOMDocument
intFile = FreeFile()
Open strXMLFilename For Input As intFile
strXMLFile = input$(LOF(1), 1)
Close intFile
Set xmlDoc = CreateObject("MSXML2.DOMDocument.6.0")
xmlDoc.LoadXML strXMLFile
Then you will iterate its nodes..grab the values and place them accordingly