Public Member Functions | |
__construct ($file, $filterCallback=null) | |
getRootElement () | |
Get the root element. | |
Public Attributes | |
$wellFormed = false | |
Will be set to true or false to indicate whether the file is well-formed XML. | |
$filterMatch = false | |
Will be set to true if the optional element filter returned a match at some point. | |
$rootElement = '' | |
Name of the document's root element, including any namespace as an expanded URL. | |
Private Member Functions | |
run ($fname) | |
rootElementOpen ($parser, $name, $attribs) | |
elementOpen ($parser, $name, $attribs) |
Definition at line 3 of file XmlTypeCheck.php.
XmlTypeCheck::__construct | ( | $ | file, | |
$ | filterCallback = null | |||
) |
$file | string filename | |
$filterCallback | callable (optional) Function to call to do additional custom validity checks from the SAX element handler event. This gives you access to the element namespace, name, and attributes, but not to text contents. Filter should return 'true' to toggle on $this->filterMatch |
Definition at line 30 of file XmlTypeCheck.php.
XmlTypeCheck::elementOpen | ( | $ | parser, | |
$ | name, | |||
$ | attribs | |||
) | [private] |
XmlTypeCheck::getRootElement | ( | ) |
Get the root element.
Simple accessor to $rootElement
Definition at line 38 of file XmlTypeCheck.php.
XmlTypeCheck::rootElementOpen | ( | $ | parser, | |
$ | name, | |||
$ | attribs | |||
) | [private] |
XmlTypeCheck::run | ( | $ | fname | ) | [private] |
XmlTypeCheck::$filterMatch = false |
Will be set to true if the optional element filter returned a match at some point.
Definition at line 14 of file XmlTypeCheck.php.
XmlTypeCheck::$rootElement = '' |
Name of the document's root element, including any namespace as an expanded URL.
Definition at line 20 of file XmlTypeCheck.php.
XmlTypeCheck::$wellFormed = false |
Will be set to true or false to indicate whether the file is well-formed XML.
Note that this doesn't check schema validity.
Definition at line 8 of file XmlTypeCheck.php.