DocumentBuilderFactory.Validating Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse. -or- Specifies that the parser produced by this code will validate documents as they are parsed.
public virtual bool Validating { [Android.Runtime.Register("isValidating", "()Z", "GetIsValidatingHandler")] get; [Android.Runtime.Register("setValidating", "(Z)V", "GetSetValidating_ZHandler")] set; }
[<get: Android.Runtime.Register("isValidating", "()Z", "GetIsValidatingHandler")>]
[<set: Android.Runtime.Register("setValidating", "(Z)V", "GetSetValidating_ZHandler")>]
member this.Validating : bool with get, set
Property Value
true if the factory is configured to produce parsers which validate the XML content during parse; false otherwise.
- Attributes
Remarks
Property getter documentation:
Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
Java documentation for javax.xml.parsers.DocumentBuilderFactory.isValidating()
.
Property setter documentation:
Specifies that the parser produced by this code will validate documents as they are parsed. By default the value of this is set to false
.
Note that "the validation" here means a validating parser as defined in the XML recommendation. In other words, it essentially just controls the DTD validation. (except the legacy two properties defined in JAXP 1.2. See here for more details.)
To use modern schema languages such as W3C XML Schema or RELAX NG instead of DTD, you can configure your parser to be a non-validating parser by leaving the #setValidating(boolean)
method false
, then use the #setSchema(Schema)
method to associate a schema to a parser.
Java documentation for javax.xml.parsers.DocumentBuilderFactory.setValidating(boolean)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.