Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ENTITY causing document load to fail

Posted on 2012-03-16
5
Medium Priority
?
298 Views
Last Modified: 2012-04-03
It appears that the following fails to load the document after I include ENTITY declarations in the XML document:

Dim oXML
Set oXML = Server.CreateObject("Msxml2.DOMDocument")
oXML.async = false
oXML.setProperty "SelectionLanguage", "XPath"
oXML.load("c:\xml\myxml.xml")

Open in new window


Here's the doc:

<?xml version="1.0" ?>
<!DOCTYPE configuration [
  <!ENTITY CLIENT "Bob Smith Motors">
]>
<details>
	<client>&CLIENT;</client>
</details>

Open in new window

0
Comment
Question by:touch-base
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:gpizzuto
ID: 37728756
Try to type CLIENT in lower case
0
 
LVL 1

Author Comment

by:touch-base
ID: 37728766
The XML snippet (which is just an example from a much bigger file which contains many mixed case names) loads & renders fine in IE, FF or Chrome...
0
 
LVL 19

Assisted Solution

by:zc2
zc2 earned 600 total points
ID: 37729537
try to turn off the xml validation on load
oXML.validateonparse=false

Open in new window


about the property: http://msdn.microsoft.com/en-us/library/ms762791.aspx
0
 
LVL 1

Author Comment

by:touch-base
ID: 37794926
Sorry for delay in getting back; the validateonparse setting makes no difference.
0
 
LVL 19

Accepted Solution

by:
zc2 earned 600 total points
ID: 37796491
If the XML object you working with is v6, you should also set this property:
oXML.setProperty "ProhibitDTD", false

Open in new window


as a side advice, try to print out the error messages, it will let you figure out what's going wrong:

if oXML.parseError.errorCode <> 0 then
   Response.Write "Error: " & oXML.parseError.errorCode & " Reason: " & oXML.parseError.reason )
end if

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question