Advertisement

07.20.2005 at 08:52PM PDT, ID: 21499115
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

EASY: Setting the timeout value using the MSXML2.DOMDocument.4.0 object

Asked by j_young_80 in Extensible Markup Language (XML)

Tags:

I am trying to find a way to set the timeout value of the XMLDOM object as i currently have a transformation that is exceeding the current value.

can anyone direct me in the correct direction? below is the current code I am using.

function xmlTransform(xml,xslt, xpathqry)

      'instantiate the XML DOM object, set the call type to sync and load the url passed
      Dim oXml
      Set oXml = Server.CreateObject("MSXML2.DOMDocument.4.0")
      'Set oXml = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
      
      oXml.async = false
      'This is required to execute a http request - a URL querystring will not execute without this - jy 19/10/04
      oXml.setProperty "ServerHTTPRequest", true
      oXML.setProperty "SelectionLanguage", "XPath"
      
      oXml.load xml
      
      debugtofile("xml = " & xml)
      debugtofile("xslt = " & xslt)
      debugtofile("xpathqry = " & xpathqry)
      
      'determine the length of one of the common report nodes - this will be used to determine whether the recordeset was returned with No Data
      Dim xpathNodeLength
      Set xpathNodeLength = oxml.selectNodes(xpathqry)
      debugtofile("Length of Node " & xpathqry & " = " & xpathNodeLength.length)
      
      'If there is an error when loading the XML document or querystring, output err code and err reason
      if oXml.parseerror.errorcode <> 0 then xmlTransform = "<h1><font color=red>Error loading XML Document :</font></h1><b>Error Code : " & oXml.parseerror.errorcode & "</b><br><b>Reason : " & oXml.parseerror.reason & "</b>"
      debugtofile("XML CONTENT = " & oXml.xml)

      'instantiate the XSLT DOM object, set the call type to sync and load the file path passed
      Dim oXsl
      Set oXsl = Server.CreateObject("MSXML2.DOMDocument.4.0")
      oXsl.async = false
      
      'load the virtual path of the .xslt file
      oXsl.load Server.MapPath(xslt)
      
      'If there is an error when loading the XSL document or querystring, output err code and err reason
      if oXsl.parseerror.errorcode <> 0 then xmlTransform = "<h1><font color=red>Error loading XSL Document :</font></h1><b>Error Code : " & oXsl.parseerror.errorcode & "</b><br><b>Reason : " & oXsl.parseerror.reason & "</b><br><b>Server MapPath: " & Server.MapPath(xslt)

      'If there have been no errors, AND a dataset has been returned apply the XSL transformation
      if oXsl.parseerror.errorcode = 0 and oXml.parseerror.errorcode = 0 and xpathNodeLength.length = 0 then
            xmlTransform= "<br><br><br><br><h1><center><font color=blue>No Data</font></center></h1>"
      elseif oXml.parseerror.errorcode = 0 and oXsl.parseerror.errorcode = 0 then
            xmlTransform= cleanstring(oXml.transformNode(oXsl))
      end if
      
      'destroy them all! (clean up the objects.)
      set oXml=nothing
      set oXsl=nothing

end function
Start Free Trial
 
Loading Advertisement...
 
[+][-]07.20.2005 at 09:58PM PDT, ID: 14491472

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.

 
[+][-]08.15.2005 at 05:37PM PDT, ID: 14679353

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

Zone: Extensible Markup Language (XML)
Tags: timeout
Sign Up Now!
Solution Provided By: EE_AutoDeleter
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32