Advertisement

06.04.2008 at 05:27AM PDT, ID: 23456350
[x]
Attachment Details

load xml file and manipulate the data

Asked by newbie27 in Extensible Markup Language (XML), JavaScript, Active Server Pages (ASP)

Tags: ASP, XML , javascript

Hello Experts,
Can someone please look into the attached and let me know If this not the correct way of loading xml file and retrieving its data. I am getting error while I am running this code. Please can you someone advice.
Regards
SStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
sFilename = sKey & ".xml"       
        sXMLFile = ADMIN_WWW_FOLDER & "\lists\data\" & sFilename        
    
        Set fso = Server.CreateObject("Scripting.FileSystemObject")
        If fso.FileExists(sXMLFile) Then                
                Set oFile = fso.OpenTextFile(sXMLFile)
                xmlData = oFile.ReadAll                
                    Set objXML = Server.CreateObject("Microsoft.XMLDOM")
                    objXML.async = False
	                objXML.Load sXMLFile
	                
	                If objXML.parseError.errorCode <> 0 Then
                    	 rTxt = objXML.parseError.srcText & " -" & objXML.parseError.line '"Unable to Load XML document"
                         Response.write WriteResponse(1, rTxt) 
                         Exit Function                        
                    End If
                    Set objLst        = objXML.getElementsByTagName("listname")
                        noOfListNames = objLst.length
                        response.Write noOfListNames
                    For i = 0 To noOfListNames 
                         Set objHdl = objLst.item(i)
                         objHdl.childNodes(1).childNodes(0).text                          
                    Next 
        End If
 
xml file
--------
<?xml version="1.0" encoding="UTF-8" ?>
<username>test@test.com</username>
<lists>
<listitem>
<listname>test</listname>
<listnotes>test</listnotes>
<listrefs>e2007092018174409,e2007092018105659</listrefs>
<last_updated>20080603|12:00:48</last_updated>
</listitem>
</lists>
[+][-]06.04.2008 at 05:31AM PDT, ID: 21709302

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 06:00AM PDT, ID: 21709539

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 07:41AM PDT, ID: 21710595

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 08:00AM PDT, ID: 21710796

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 09:52AM PDT, ID: 21711879

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 09:59AM PDT, ID: 21711946

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 10:04AM PDT, ID: 21711983

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 10:07AM PDT, ID: 21712014

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 10:07AM PDT, ID: 21712019

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 10:12AM PDT, ID: 21712058

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 10:20AM PDT, ID: 21712130

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 10:37AM PDT, ID: 21712240

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 02:20AM PDT, ID: 21717455

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 09:25AM PDT, ID: 21721285

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Extensible Markup Language (XML), JavaScript, Active Server Pages (ASP)
Tags: ASP, XML , javascript
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628