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.

1
  • A sample of the XML would be useful. Or at least a link to CDRs for those that are not familiar with it Dec 3, 2012 at 18:27

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .