0

I am trying to write a VB Script to read a XML file (downloaded daily) and insert the information into a MSSQL DB. The content of the XML is a list of CDRs (Call Data Records). I need to parse the file and insert the cdr's into a table. I'm a Ruby,Perl,PHP,Javascript,SQL,... programer.

But I've really never written any VB Script. I've done some googling and find a number of examples on how to generate XML from a SQL Query, but not the reverse.

Any help/suggestions would be greatly appreciated.

Kiquenet
  • 143
  • 1
  • 9

1 Answers1

0

I agree with @James Mohler's comment. It would be better if you could provide us with an example with the sensitive data ommited as CDRs contain personal information.

I would recommend searching Stackoverflow for help with your question as within seconds I found an answer that will help solve the first part of reading in the XML.

Set objXMLDoc = CreateObject("Microsoft.XMLDOM") 
objXMLDoc.async = False 
objXMLDoc.load("example.xml")

Set Root = objXMLDoc.documentElement 


For Each Elem In NodeList 
   SET ElementValue = Elem.getElementsByTagName("ElementName")(0)
Next

Credit

Malachi
  • 441
  • 2
  • 9
  • 18