473,395 Members | 1,613 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

xml resolvexternals

How can you tell a .NET XMLDocument not to resolve externals such as DTDs (in VB)

Before .NET you used to say
xmldoc.resolveExternals = False
Jul 21 '05 #1
2 1730
Hello,

Thanks for your post. In .NET, we can use the XmlDocument.XmlResolver
property. MSDN documentation on XmlDocument.XmlResolver states that:

"In version 1.1 of the .NET Framework, if this property is not set, the
trust level of the application determines the default behavior.

Fully-trusted code: The document uses a default XmlUrlResolver with no user
credentials. If authentication is required to access a network resource,
use the XmlResolver property to specify an XmlResolver with the necessary
credentials.

Semi-trusted code: The XmlResolver property is set to a null reference
(Nothing in Visual Basic). External resources are not resolved."

You should set this property to null (Nothing in VB.NET) so that the
XmlDocument loads files as anonymous, and does not attempt to resolve any
other resources. Please refer to the following MSDN article for detailed
information:

Resolving External Resources
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconResolvingExternalResources.asp?frame=true

Please feel free to let me know if you have any problems or concerns.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
Tian,

Thank you very much. That did the trick!

You might want to have someone review the .NET documentation. I spent a good 30 minutes or more poring over the section on xmlResolver with no success finding if it could be used for this purpose.

But your post made it crystal clear. Thanks again.

-Mark
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark Finkel | last post by:
How can you tell a .NET XMLDocument not to resolve externals such as DTDs (in VB) Before .NET you used to say xmldoc.resolveExternals = False
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.