phpDocumentor sax
[ class tree: sax ] [ index: sax ] [ all elements ]

Class: Sax

Source Location: /myphp-1.9/myphp-1.9-sax/html/component/Sax.php

Class Sax

Class Overview

Used to parse an xml file utilizing the SAX model

  1. Usage:
  2. $sax = new Sax($file); // call parse() from constructor
  3. or:
  4. $sax = new Sax();
  5. $sax->parse($file);
  6. or:
  7. Sax::display($file);

Located in /myphp-1.9/myphp-1.9-sax/html/component/Sax.php [line 35]

Object
   |
   --Sax

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Object

Object::$cachefile
Object::$html
Object::$sql

Inherited From Object

Object::Object()
Constructor
Object::addHtml()
Add the current html to the SourceCode object
Object::getCacheFileName()
Returns the name of the cache file name
Object::getClassName()
Returns the name of the instanciated class
Object::getHtml()
Returns the html for the element
Object::getMsg()
Get the formatted message and debug level and Log to file ?
Object::save()
Save the SQL cache file
Object::setCacheFileName()
Set the path/name of the cache file
Object::toString()
Returns the information for this class
Object::write()
Write the content to the file opened by fp

[ Top ]
Property Summary
String   $currentAttribs  
String   $currentTag  
String   $xml  
String   $xml_parser  

[ Top ]
Method Summary
Sax   Sax()   Constructor
void   characterData()   Used to catch the event for handling the data.
void   defaultData()   Used to catch the event for handling the default data.
void   destroy()   Destructor
void   display()   Display html
void   endElement()   Used to catch the event for end of element.
String   getHtml()   Returns the xml file as html
void   parse()   Parse the specified xml file, and call the handlers
void   startElement()   Used to catch the events for working with or handling the start and end tags within the xml file.

[ Top ]
Properties
String   $currentAttribs = '' [line 49]

[ Top ]
String   $currentTag = '' [line 44]

[ Top ]
String   $xml = '' [line 54]

[ Top ]
String   $xml_parser = NULL [line 39]

[ Top ]
Methods
Constructor Sax  [line 60]

  Sax Sax( [String $file = '']  )

Constructor

Parameters:
String   $file:  The xml file to parse


[ Top ]
characterData  [line 159]

  void characterData( String $parser, mixed $data, String $name  )

Used to catch the event for handling the data.

Character data is rougly all the non-markup content of xml documents.

Parameters:
String   $parser:  The xml parser
String   $name:  The data


[ Top ]
defaultData  [line 170]

  void defaultData( String $parser, String $data  )

Used to catch the event for handling the default data.

It will be called for each piece of xml that doesn't have a set handler

Parameters:
String   $parser:  The xml parser
String   $data:  The default data


[ Top ]
destroy  [line 126]

  void destroy( )

Destructor

Free the resources



[ Top ]
display  [line 212]

  void display( [String $file = '']  )

Display html

  1. Usage:
  2. Sax::display($file);

Parameters:
String   $file:  The file to parse

API Tags:
Static:  


[ Top ]
endElement  [line 179]

  void endElement( String $parser, String $name  )

Used to catch the event for end of element.

Parameters:
String   $parser:  The xml parser
String   $name:  The name of the element


[ Top ]
getHtml  [line 187]

  String getHtml( )

Returns the xml file as html


API Tags:
Return:  The xml converted to html


Redefinition of:
Object::getHtml()
Returns the html for the element

[ Top ]
parse  [line 71]

  void parse( String $file  )

Parse the specified xml file, and call the handlers

Parameters:
String   $file:  The file to read and parse as xml


[ Top ]
startElement  [line 142]

  void startElement( String $parser, String $name, String $attribs  )

Used to catch the events for working with or handling the start and end tags within the xml file.

Element events are issued whenever the xml parser encounters start or end tags.

Parameters:
String   $parser:  The xml parser
String   $name:  The name of the element
String   $attribs:  An array of attributes


[ Top ]

Documentation generated on Thu, 22 Dec 2005 17:17:02 +0100 by phpDocumentor 1.3.0RC3