Home
Products & Services
Developers
XML
Contents Table
On-Line Help
Release Notes
Install Notes
Binaries
Sources
XML-RPC
RSS
About

ParseString Method

See Also   Example   Applies To

The passed string with the contents of the XML document is parsed and may check the document is well-formed and valid.

Syntax

object.ParseString (Data, CheckWellFormed)

Part Description
object An object expression that evaluates to an XMLDOMParser object.
Data Required. A string with the contents of the XML document.
CheckWellFormed Optional. A boolean that defines whether the parser should check the XML is "well formed". Defaults to True, i.e. will check the document is well-formed.

Remarks

The default behaviour of this method is to check the document is well formed. The validation against a DTD is determined by the ValidationRule property.

Background

There are two checks that can be carried out on an XML file, the first is to check the document is "well formed", this means does it have all open tags closed, only one root element etc. The second check is "is it valid", this can be carried out by checking against a DTD and/or a schema. DTD validation checks that the right elements are in the right place.

This method actually uses the XMLSAXParser to parse the document and then uses the raised events to populate the DOM Node tree. The XMLSAXParser also checks the document is well formed, the DTD validation is carried out in the XMLDOMParser object.

Terms of Use, Cookie and Privacy Policies All Materials on this Website are Copyright EnAppSys Ltd. ©2002 - 2009