Advertisement
Advertisement
| 06.04.2008 at 05:27AM PDT, ID: 23456350 |
|
[x]
Attachment Details
|
||
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>
|