Class XMLParser

(line 26)

Description


Located in File: /XMLParser.class.php

XML Parser Class (php5)

Parses an XML document into an object structure much like the SimpleXML extension.



Class Variables

Summary:
object $document
resource $parser
array $stack
string $xml

$cleanTagNames (line 62)

Data type : bool

Whether or not to replace dashes and colons in tag names with underscores.
  • access: - private

$document (line 47)

Data type : object

Document tag

$parser (line 33)

Data type : resource

The XML parser
  • access: - private

$stack (line 54)

Data type : array

Current object depth
  • access: - private

$xml (line 40)

Data type : string

The XML document
  • access: - private

Class Constants

Summary:

Method Detail

Summary:
XMLParser __construct ([string $xml = ''], [ $cleanTagNames = true])
void CharacterData (resource $parser, string $data)
void EndElement (resource $parser, string $name)
string GenerateXML ()
object GetStackLocation ()
void HandleError (int $code, int $line, int $col)
void Parse ()
void StartElement (resource $parser, string $name, [array $attrs = array()])

Constructor __construct (line 71)

XMLParser __construct( [string $xml = ''], [ $cleanTagNames = true])

Constructor. Loads XML document.

Parameters

  • string $xml: The string of the XML document
  • $cleanTagNames:

Info

Method CharacterData (line 194)

void CharacterData( resource $parser, string $data)

Handler function for the character data within a tag

Parameters

  • resource $parser:
  • string $data:

Info

  • access - private

Method EndElement (line 182)

void EndElement( resource $parser, string $name)

Handler function for the end of a tag

Parameters

  • resource $parser:
  • string $name:

Info

  • access - private

Method GenerateXML (line 122)

string GenerateXML( )

Gets the XML output of the PHP structure within $this->document

Info

  • access - public

Method GetStackLocation (line 132)

object GetStackLocation( )

Gets the reference to the current direct parent

Info

  • access - private

Method HandleError (line 111)

void HandleError( int $code, int $line, int $col)

Handles an XML parsing error

Parameters

  • int $code: XML Error Code
  • int $line: Line on which the error happened
  • int $col: Column on which the error happened

Info

  • access - private

Method Parse (line 86)

void Parse( )

Initiates and runs PHP's XML parser

Info

Method StartElement (line 145)

void StartElement( resource $parser, string $name, [array $attrs = array()])

Handler function for the start of a tag

Parameters

  • resource $parser:
  • string $name:
  • array $attrs:

Info

  • access - private

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Tue, 22 Dec 2009 09:42:53 +0100 by phpDocumentor 1.4.1