Results 1 to 2 of 2

Thread: SelectSingleNode

  1. #1
    Join Date
    Dec 1969

    Default SelectSingleNode

    When i use SelectSingleNode in my asp page it says OBJECT REQUIRED error. How to solve this problem<BR><BR>Thanks in advance<BR>---------------------------------------------------------------<BR>Here is the Code bit <BR>ViewDetail "rolodex.xml", "ViewDetail.xsl", Request.QueryString("email")<BR><BR>Function viewDetail(strXMLFile, strXSLFile, strEMail)<BR><BR> &#039;Declare local variables<BR> Dim objXML<BR> Dim objNode<BR> Dim objXSL<BR><BR> Set objXML = Server.CreateObject("Microsoft.XMLDOM")<BR><BR> <BR><BR> &#039;Turn off asyncronous file loading.<BR> objXML.async = false<BR><BR> &#039;Load the XML file.<BR> objXML.load(strXMLFile)<BR><BR>Set objNode = objXML.SelectSingleNode("rolodex/contact<BR> [field/field_value=&#039;" & strEMail & "&#039;]")<BR><BR> &#039;Instantiate the XMLDOM Object that will hold the XSL file.<BR> set objXSL = Server.CreateObject("Microsoft.XMLDOM")<BR> <BR><BR> &#039;Turn off asyncronous file loading.<BR> objXSL.async = false<BR><BR> &#039;Load the XSL file.<BR> objXSL.load(strXSLFile)<BR><BR> &#039;Use the "transformNode" method of the XMLDOM to apply the XSL<BR> &#039;stylesheet to the XML document. Then the output is written to the<BR> &#039;client.<BR> Response.Write(objnode.transformNode(objXSL))<BR>E nd Function<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SelectSingleNode

    when calling on the "load" method of the XML Dom Parser, try putting in an absolute address, thus try using:<BR><BR>objXML.load(Server.MapPath(strXMLFil e)) in your function, and do the same for the XSL Style Sheet<BR><BR>Regards

Posting Permissions

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