Results 1 to 5 of 5

Thread: xml Error

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    120

    xml Error

    The system cannot locate the object specified

    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE></TITLE>
    </HEAD>
    <BODY>

    <html>
    <body>
    <%
    dim z
    z=Request("MODE")
    if (z<>"1")then

    %>
    <Form name=frm Action="http://localhost/asp/xml2/xml2.asp?MODE=1" method=post>
    <%
    txt="<h1>Traversing the node tree</h1>"
    Response.write(txt)
    dim xmlDoc
    dim x

    set xmlDoc=CreateObject("Msxml2.DOMDocument")

    if(err.number<>0)then
    Response.Write "error"
    end if

    xmlDoc.async="false"
    xmlDoc.load("GetPriceList.xml")

    if(err.number<>0)then
    Response.Write "error"
    end if

    Response.Write xmlDoc.parseerror.reason

    if(err.number<>0)then
    Response.Write "error"
    end if

    Response.End
    for each x in xmlDoc.documentElement.childNodes
    Response.Write("<b>" & x.nodename & "</b>")
    Response.Write(": ")
    Response.Write(x.text)
    Response.Write("<br>")
    next
    Response.End
    end if
    %>

    </Form>
    </body>
    </html>
    <P>&nbsp;</P>

    </BODY>
    </HTML>



    what m i doing wrong ?
    please help .
    shachar shaty

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Locate WHAT specified object?????
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    120
    the error line is 0 i dont know what it means?
    shachar shaty

  4. #4

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    BTW, try doing your error handling like this
    VB Code:
    1. If XMLdoc.parseError.errorCode = 0 Then
    2.         If XMLdoc.readyState = 4 Then
    3.             ' OK. Do whatever you want to here.
    4.         End If
    5.     Else
    6.         Err.Description = XMLdoc.parseError.reason & vbCrLf & _
    7.         "Line: " & XMLdoc.parseError.Line & vbCrLf & _
    8.         "XML: " & XMLdoc.parseError.srcText
    9.         Err.Raise 1006
    10.     End If

Posting Permissions

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



Click Here to Expand Forum to Full Width