SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reading XML File With Classic ASP

    I have done lots og googling but did nto find the resolution to my problem.

    I have to read XML string, parse it and store the values in database as well as I have to show it to the user.
    Following the code I wrote to show the parsed XML on the web. It is working

    Code:
    My XML String
    
    <?xml version="1.0" encoding="utf-8"?>
    <get-subscriber-call-hdr trid = "2065961">
        <history>
            <call>
                <id>9696705</id>
                <narrative>1234</narrative>
            </call>
    
            <call>
                <id>9696706</id>
                <narrative>1234</narrative
            </call>
        </history>
    </get-subscriber-call-hdr>
    Code:
    Function ParseCDRXML(strXML)
    	Dim objXML,objRoot ,I, thisNode,strID, strNarrative
    	
    	Set objXML= Server.CreateObject("Microsoft.XMLDOM") 
    	objXML.async = False 
    	objXML.loadXML(strXML) 
    	Set objRoot = objXML.documentElement 
    
                  For I = 0 TO (objRoot.childNodes.length - 1) 
                       Set thisChild = objRoot.childNodes(I) 
                       strID 			= thisChild.childNodes(0).Text 
                       strNarrative 	= thisChild.childNodes(2).Text
           	    DoSomething strID,strNarrative		        			        			        			        			        			        			 
    	Next	   	
    End Function

  2. #2
    SitePoint Guru
    Join Date
    Jun 2007
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to hear code you have is working. What code do you have that is not working ?

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is it that is not working?


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •