Home
Products & Services
Developers
XML
Contents Table
On-Line Help
Release Notes
Install Notes
Binaries
Sources
XML-RPC
RSS
About
Want to know more?
Use the following form to contact someone at EnAppSys for more information.

ParseFile Method

See Also   Example   Applies To

Gets a local XML file and may check the document is well formed and valid.

Syntax

object.ParseFile (FileName, CheckWellFormed)

Part Description
object An object expression that evaluates to an XMLDOMParser object.
FileName Required. A string with the name of the local file to parse.
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 uses simple visual basic file access functions and therefore is restricted to files on local or mapped drives. This method actually loads the contents of the file into a string and then passes it to the ParseString method for well formed and validation checks.

Terms of Use, Cookie and Privacy PoliciesAll Materials on this Website are Copyright EnAppSys Ltd. ©2002 - 2012
Registered Office: EnAppSys Ltd, Arnison House, 139B The High Street, Yarm, Stockton-on-Tees TS15 9AY
Registered in England and Wales, Number: 4685938