Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

Thank you!

share|improve this question
A sample of the XML would be useful. Or at least a link to CDRs for those that are not familiar with it – James A Mohler Dec 3 '12 at 18:27

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 

Set Root = objXMLDoc.documentElement 

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


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.