CodeGen
[ class tree: CodeGen ] [ index: CodeGen ] [ all elements ]

Class: CodeGen_XmlParser

Source Location: /CodeGen-0.9.0rc1/CodeGen/XmlParser.php

Class Overview


Yet another XML parsing class


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 Hartmut Holzgraefe

Variables

Methods


Child classes:

CodeGen_ExtensionParser
Parser for XML based extension desription files

Inherited Variables

Inherited Methods


Class Details

[line 49]
Yet another XML parsing class

This is similar to the "func" mode of XML_Parser but it borrows some concepts from DSSSL. The tag handler method to call is not only determined by the tag name but also potentially by the name of its parent tags, and the most specific handler method (that is the one including the maximum number of matching parent tags in its name) wins. This way it is possible to have e.g. tagstart_name as a general handler for a <name> tag while tagstart_function_name handles the more special case of a <name> tag within a <function> tag. Character data within a tag is collected and passed to the end tag handler. Tag names and attributes are managed using stack arrays. Attributes are not only passed to both the start and end tag handlers.



[ Top ]


Class Variables

$filename =  false

[line 110]

Input Filename
  • Access: public

Type:   string


[ Top ]

$fp =  null

[line 118]

Input stream
  • Access: public

Type:   resource


[ Top ]

$verbatim =  false

[line 126]

Verbatim indicator
  • Access: public

Type:   string


[ Top ]

$verbatimDepth =  0

[line 134]

Verbatim taglevel depth
  • Access: public

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 141]

CodeGen_XmlParser __construct( )

The constructor
  • Access: public

Overridden in child classes as:

CodeGen_ExtensionParser::__construct()
Constructor

[ Top ]

extEntityHandler   [line 186]

void extEntityHandler( $parser, $openEntityNames, $base, $systemId, $publicId)


Parameters:

   $parser   — 
   $openEntityNames   — 
   $base   — 
   $systemId   — 
   $publicId   — 

[ Top ]

newParser   [line 146]

void newParser( )


[ Top ]

parse   [line 218]

void parse( )

Perform the actual parsing

[ Top ]

popParser   [line 171]

void popParser( )


[ Top ]

posString   [line 178]

void posString( )


[ Top ]

pushParser   [line 163]

void pushParser( )


[ Top ]

setInputFile   [line 205]

void setInputFile( string $filename)

Set file to parse
  • Access: public

Parameters:

string   $filename   — 

[ Top ]

toBool   [line 488]

bool toBool( mixed $arg)

accept various truth values
  • Access: public

Parameters:

mixed   $arg   — 

[ Top ]

verbatim   [line 242]

void verbatim( )

Start verbatim mode

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:16:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.