Go4Expert

Go4Expert (http://www.go4expert.com/)
-   ASP (http://www.go4expert.com/forums/asp/)
-   -   Problem while parsing Simple XML files (http://www.go4expert.com/forums/parsing-simple-xml-files-t13344/)

rag84dec 28Aug2008 12:15

Problem while parsing Simple XML files
 
I have an XML file "r1.xml"
Code:

<root>
    <val>Value1</val>
    <val1>value2</val1>
</root>


I have an ASP script file as below
Code:

dim rootName12

 Set objXML = Server.CreateObject("Microsoft.XMLDOM")
 Set objLst = Server.CreateObject("Microsoft.XMLDOM")
 objXML.async = False
 objXML.Load (Server.MapPath("r1.xml"))
 If objXML.parseError.errorCode <> 0 Then
        'handle the error
 End If
 
Set rootName12 =  objXML.documentElement

Set nm= rootName12.childNodes.item(0).tagName ' I am 'getting error here


But i am getting an error like this

Microsoft VBScript runtime (0x800A01A8)
Object required: 'rootName12'




Can anyone help???

thanks

pradeep 23Sep2008 16:06

Re: Problem while parsing Simple XML files
 
http://www.devguru.com/technologies/...ntElement.html


All times are GMT +5.5. The time now is 06:01.