XmlTypeCheck Class Reference

List of all members.

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)


Detailed Description

Definition at line 3 of file XmlTypeCheck.php.


Constructor & Destructor Documentation

XmlTypeCheck::__construct ( file,
filterCallback = null 
)

Parameters:
$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.

References $file, and run().


Member Function Documentation

XmlTypeCheck::elementOpen ( parser,
name,
attribs 
) [private]

Definition at line 80 of file XmlTypeCheck.php.

References $name.

Referenced by rootElementOpen().

XmlTypeCheck::getRootElement (  ) 

Get the root element.

Simple accessor to $rootElement

Definition at line 38 of file XmlTypeCheck.php.

XmlTypeCheck::rootElementOpen ( parser,
name,
attribs 
) [private]

Definition at line 68 of file XmlTypeCheck.php.

References $name, and elementOpen().

XmlTypeCheck::run ( fname  )  [private]

Definition at line 42 of file XmlTypeCheck.php.

References $file, and $fname.

Referenced by __construct().


Member Data Documentation

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.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:51 2009 for MediaWiki by  doxygen 1.5.9