Solved

XmlReaderSettings.ValidationType Property

Posted on 2011-09-30
1
293 Views
Last Modified: 2012-06-27
I do not quitely understand the meaning of XmlReaderSettings.ValidationType Property.
Plesase look at MSDN.
If there is no validation for xml in the code and just read the xml file directly, what will happen?

Thanks.
0
Comment
Question by:zhshqzyc
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 36891986
I do not quitely understand the meaning of XmlReaderSettings.ValidationType Property.
You have to understand a bit about XML in order to understand what this property is for. I'm sure your familiar with the idea that XML is a markup language--one in which you, the author, defines what the tags of the markup language are. But how do you dictate to others what the valid tags of your language are? You use either a DTD (Document Type Definition) or a Schema. Both accomplish the same goal, but they do so in different ways. The purpose of the property is to specify which method your XML document expects.

If there is no validation for xml in the code and just read the xml file directly, what will happen?
You can certainly read in an XML document without validation, provided the document is well-formed. You just won't know if the document follows the rules of the defined language (e.g. is a tag used in the document defined by the DTD or Schema) without validation. You can still use and manipulate the XML.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 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