phpDocumentor SAFOX
SAFOX_P
[ class tree: SAFOX ] [ index: SAFOX ] [ all elements ]

Class: xmlParser

Source Location: /safox_p.cls.php

Class xmlParser

Class Overview

class xmlParser

Changes History : See File Information for changes

Located in /safox_p.cls.php [line 192]



		
				Author(s):
		
  • CVH, cpi-service; cvh@cpi-service.com
Information Tags:
License:  GNU
Version:  0.5

Methods

[ Top ]
Method Summary
void   xmlParser()   Constructor
void   destroy()   Destructor
string   &getError()   returns the last occured error or false when all errors have been returned
--   getErrors()   Returns Array of Errors occured or false
(xmlDoc)   &getXmlDoc()   return the XMLDOC Object if succesfully parsed otherwise false
boolean   loadFile()   Load a String to be parsed from a xml Document File
boolean   parse()   Parse the String and create an xmlDoc Object
void   registerEvent()   registerEvent - registers a functionname to be exucted when event is fired
void   setString()   Set String to be parsed
void   setUida()   setUida - sets the "unique ID Attribute"-name

[ Top ]
Methods
Constructor xmlParser  [line 237]

  void xmlParser( )

Constructor



[ Top ]
destroy  [line 246]

  void destroy( )

Destructor



[ Top ]
getError  [line 607]

  string &getError( )

returns the last occured error or false when all errors have been returned


API Tags:
Return:  latest error message or false


[ Top ]
getErrors  [line 599]

  -- getErrors( )

Returns Array of Errors occured or false


API Tags:
Return:  array of error messages or false


[ Top ]
getXmlDoc  [line 268]

  (xmlDoc) &getXmlDoc( )

return the XMLDOC Object if succesfully parsed otherwise false


API Tags:
Return:  or boolean


[ Top ]
loadFile  [line 289]

  boolean loadFile( $filename $filename  )

Load a String to be parsed from a xml Document File

Parameters:
$filename   $filename: 
  • string filename to be set


[ Top ]
parse  [line 311]

  boolean parse( )

Parse the String and create an xmlDoc Object


API Tags:
Return:  
  • true if successful
Access:  public


[ Top ]
registerEvent  [line 670]

  void registerEvent( $event $event, $functionname $functionname  )

registerEvent - registers a functionname to be exucted when event is fired

currently supported events: XPE_ON_PARSE_DEF (0); // Event On Parsing <? xml .. String XPE_ON_PARSE_DTD (1); // On Parsing DTD XPE_ON_PARSE_TAG (2); // On Parsing TagName XPE_ON_PARSE_ATT (3); // On Parsing Attribute String XPE_ON_PARSE_CDT (4); // On Parsing CDATA XPE_ON_PARSE_NOD (5); // On Node Parsing Completed Object XPE_ON_PARSE_CMT (6); // On Parsing a Comment XPE_ON_PARSE_XSP (7); // On Parsing XML Specific Tags <?;

User-Defined Eventhandlers will be called with two parameters :

  • &$data - relevant information for event (e.g. the unparsed DOCTYPE string in the XPE_ON_PARSE_DTD event)
  • &$node - reference to Node Object

EventHandlers should be considered for "PreProcessing Data" if Events are handled by XMLPARSER themselves FullProcessing - The Following Events are currently not handled by the XMLPARSER

  • XPE_ON_PARSE_DTD (an event is fired providing the DOCTYPE string that otherwise is ignored by the Parser and the reference to the xmlDoc-object and the parser object-ref)
  • XPE_ON_PARSE_CMT (an event is fired providing the comment-tag string that otherwise is ignored by the Parser and the reference to the xmlDoc (or Node)-object and the parser object-ref )
  • XPE_ON_PARSE_XSP (an event is fired providing the special XML-tag string that otherwise is ignored by the Parser and the reference to the xmlDoc-object and the parser object-ref )
Post-Processing Events :
  • XPE_PN_PARSE_NOD (an event is fired providing an empty string (no unparsed stringdata left) and the reference to the node-object and the parser object-ref)
All Other Events are to be used for PreProcessing Purposes and will be provided the relavant string-data, a null var , and the parser reference

Parameters:
$event   $event: 
$functionname   $functionname: 

API Tags:
Access:  public


[ Top ]
setString  [line 256]

  void setString( $string $string  )

Set String to be parsed

Parameters:
$string   $string: 


[ Top ]
setUida  [line 281]

  void setUida( mixed $uida, $uida $node-  )

setUida - sets the "unique ID Attribute"-name

that is used for GetNodeById, SetId etc of XMLNode/Doc Objects a uida usually is "id" but sometimes in xml may be something like "recordno", "uid" ...

Parameters:
$uida   $node-: 
  • set the "unique ID Attribute"-name to which the parser should listen to call >setId()


[ Top ]

Documentation generated on Thu, 9 Feb 2006 13:55:16 +0100 by phpDocumentor 1.3.0RC3