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

File: SaxFilters.php

Source Location: /XML_SaxFilters-0.3.0/SaxFilters.php

Classes:

Page Details:

  • Version: $Id: XML_SaxFilters.php,v 1.5 2003/09/12 11:21:37 harryf Exp $

Includes:

require_once(XML_SAXFILTERS.'SaxFilters/AbstractFilter.php') [line 35]
Include abstract filter

XML_SaxFilters_buildChain [line 110]

boolean XML_SaxFilters_buildChain( object extending &$Parser, mixed &$filters)

Utility to help chain an array of filters together to a parser.

 $parser = & XML_SaxFilters_createParser('Expat','String',$xmlstring);

 $filters = array();
 $filters[] = & new FilterA(); // Chained to the parser
 $filters[] = & new FilterB(); // Chained to FilterA
 $filters[] = & new FilterC(); // Chained to FilterB

 // Build the chain
 XML_SaxFilters_buildChain($parser,$filters);

 $parser->parse();

  • Return: TRUE on success
  • Access: public


Parameters

object extending   &$Parser   XMLSaxFilters_AbstractParser
mixed   &$filters   array of filter objects or single filter object
[ Top ]



XML_SaxFilters_createParser [line 56]

mixed &XML_SaxFilters_createParser( string $parserType, string $readerType, mixed $input)

Creates the SaxFilter parser and associated IO readerType

// Create a parser using Expat and a string IO reader, where // $xmlstring contains the XML document $parser = & XML_SaxFilters_createParser('Expat','String',$xmlstring);

// Add some user defined filter to the parser $parser->setChild(new MyFilter()); $parser->parse(); </pre>

  • Access: public


Parameters

string   $parserType   parser type ('Expat' or 'HTMLSax')
string   $readerType   reader type ('File' or 'String')
mixed   $input   input source (string containing XML, filename or array)
[ Top ]



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