Article ID: 254643 - Last Review: August 14, 2007 - Revision: 3.5 PRB: loadXML Method Fails to Process DTD or Schema with Relative Path at the Server SideThis article was previously published under Q254643 On This PageSYMPTOMS
When you use the loadXML method to load an XML string that references an external document type definition (DTD) or schema on the server side in an Active Server Pages (ASP) page, the following error message may appear:
"System error: -2146697210. Error processing resource 'xxx.DTD'"
CAUSE
The Microsoft XML parser (MSXML) cannot determine the physical location of the file from a relative path.
RESOLUTION
To resolve this problem, use an absolute path instead of a relative path. You can use either a full Universal Naming Convention (UNC) path or a file path. You can use the MapPath method of the server object to map a specified relative or virtual path to the corresponding physical folder on the server.
MORE INFORMATION
Internet Explorer 5.01 fixes another problem with similar symptoms in which DTDs and schemas are not resolved when you use the loadXML method. See the "References" section for additional information on that problem. After you install Internet Explorer 5.01, you can use loadXML with DTDs or schemas in a client-side script without problem. However, you will still experience the problem when you use a relative path on the server side. The loadXML method merely takes a string of XML into memory. When this string has a reference to an external DTD or schema, MSXML attempts to load the file. If the path is a relative path, MSXML has no way to locate the file and fails to process the DTD or schema. If a newer version of MSXML has been installed in side-by-side mode, you must explicitly use the Globally Unique Identifiers (GUIDs) or ProgIDs for that version to run the sample code. For example, MSXML version 4.0 can only be installed in side-by-side mode. For additional information about the code changes that are required to run the sample code with the MSXML 4.0 parser, click the following article number to view the article in the Microsoft Knowledge Base: 305019
(http://support.microsoft.com/kb/305019/EN-US/
)
INFO: MSXML 4.0 Specific GUIDs and ProgIds Steps to Reproduce Behavior
REFERENCESFor more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites: http://msdn.microsoft.com/ie/
(http://msdn.microsoft.com/ie/)
Platform SDK, Server.MapPath
http://support.microsoft.com/iep (http://support.microsoft.com/iep) http://msdn.microsoft.com/en-us/library/ms524632.aspx
(http://msdn.microsoft.com/en-us/library/ms524632.aspx)
| Article Translations
|
Back to the top
