contenido\classes\class.xml.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

Description: Class XML_doc

Requirements:

Author
Jan Lengowski  
Con_php_req
5.0  
Copyright
four for business AG  
License
http://www.contenido.org/license/LIZENZ.txt  
Link
http://www.4fb.de  
Link
http://www.contenido.org  
Package
4fb_XML  
Since
file available since contenido release <= 4.6 {@internal created unknown modified unknown, Martin Horwath modified 2008-06-30, Dominik Ziegler, add security fix $Id: class.xml.php 1072 2009-10-14 07:13:07Z oldperl $: }}  
Version
0.9.7  

\XML_doc

Package: Default
Class XML_doc

Simple class for extracting values from a XML document. Uses a simplified XPath syntax to access the elements. For example: 'root/person/name' would return the value of the 'name' node in 'root/person' node. You have to specify the root node name. Can't access node attributes yet.

Properties

>VPropertypublic$encoding
XML encoding
Details
Type
n/a
>VPropertypublicarray $errors = array()
Default valuearray()Details
Type
array
>VPropertypublic\help $itemname

array

Details
Type
\help
>VPropertypublic\parsed $parsearray

array

Details
Type
\parsed
>VPropertypublic$parser
XML Parser Object
Details
Type
n/a
>VPropertypublicstring $xml

xml

Details
Type
string

Methods

methodpublicXML_doc() : void

Class Construcor

methodpublic_translateLiteral2NumericEntities( $xmlSource,  $reverse = FALSE) : void

Parameters
NameTypeDescription
$xmlSource
$reverse
methodpubliccharacterData( $parser,  $data) : void

Parameters
NameTypeDescription
$parser
$data
methodpublicendElement( $parser,  $name) : void

Parameters
NameTypeDescription
$parser
$name
methodpublicfindLoosePath(\aCombination $aCombination,  $aScope = true) : false

findLoosePath: Finds a path in the XML array which ends with the given keys

Parameters
NameTypeDescription
$aCombination\aCombination

array of keys to test for

$aScope
Returns
TypeDescription
falseif nothing was found, or the array with the found keys
methodpublicload(string $filename) : boolean

load()

Load the XML file

Parameters
NameTypeDescription
$filenamestring

XML document filename

Returns
TypeDescription
booleantrue if the load was successful
methodpublicparse( $send = true) : array

parse()

Parse the xml file in an array

Parameters
NameTypeDescription
$send
Returns
TypeDescription
arrayparsearray
methodpublicstartElement( $parser,  $name,  $attrs) : void

Parameters
NameTypeDescription
$parser
$name
$attrs
methodpublicvalueOf( $xpath) : String

valueOf()

Extract one node value from the XML document. Use simplified XPath syntax to specify the node. F.e. 'root/test/firstnode'

Parameters
NameTypeDescription
$xpath
Returns
TypeDescription
StringValue of XML node
Documentation was generated by phpDocumentor 2.0.0a12.