Problems with the external DTD definition when MSXML processes XML documents--property settings (ASP)

Source: Internet
Author: User
Tags definition xsl xsl file
xml| problem |xml xmlfile = "Http://myserver/catalog.xml"
Xslfile = "Catalog.xsl"

' Create related objects
Set xsldoc = server. CreateObject ("MSXML2.") Freethreadeddomdocument ")
Set xmldoc = server. CreateObject ("MSXML2.") DOMDocument ")

' Read the XSL file
Xsldoc.async = False
Xsldoc.resolveexternals = True
Xsldoc.load server. MapPath (Xslfile)
' Read XML file
Xmldoc.setproperty ' ServerHTTPRequest ', true ' set ServerHTTPRequest property to True to load an XML document through the HTTP protocol
Xmldoc.async = False ' Sets the Async property to False to turn off the asynchronous call
Xmldoc.resolveexternals = True ' Set Resolveexternals to True open external DTD analysis
Xmldoc.validateonparse = False ' sets Validateonparse to False allows document validation
Xmldoc.load xmlfile ' Read XML document
Do while (xmldoc). ReadyState < 4) ' Check ReadyState status value is 4 ' specific numeric definition see MSXML SDK document
Xmldoc.waitforresponse 10 ' Wait for the document to complete read through the waitForResponse method ' if read completed, System paused for 10 milliseconds
Loop

' Convert XML-> HTML and output document
Xmldoc.transformnodetoobject Xsldoc,response

' Empty object
Set XSLT = Nothing
Set Xsldoc = Nothing
Set xmldoc = Nothing




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.