Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cXmlBase
  • cXmlReader
  • cXmlWriter
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cXmlReader

XML reader class

cXmlBase
Extended by cXmlReader
Package: Core\XML
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Dominik Ziegler
Located at classes/xml/class.xml.reader.php
Methods summary
public boolean
# load( string $filename )

Loads a XML document from file and initializes a corresponding DOMXPath instance.

Loads a XML document from file and initializes a corresponding DOMXPath instance.

Parameters

$filename
string
$filename path to the XML document

Returns

boolean
load state (true = successfully loaded, false = not found or loaded)

Throws

cException
if file could not be loaded
public boolean
# loadXML( string $sXml )

Loads a XML document from file and initializes a corresponding DOMXPath instance.

Loads a XML document from file and initializes a corresponding DOMXPath instance.

Parameters

$sXml
string
$sFilename path to the XML document

Returns

boolean
load state (true = successfully loaded, false = not found or loaded)

Throws

cException
if XML could not be loaded
public DOMNodeList
# getXpathNodeList( string $path )

Returns a DOMNodeList for a given XPath expression.

Returns a DOMNodeList for a given XPath expression.

Parameters

$path
string
$path xpath string

Returns

DOMNodeList

Throws

cException
if there is no xpath
public DOMNode
# getXpathNode( string $path, integer $nodeKey = 0 )

Returns the element of an DOMNodeList read out by a xpath string.

Returns the element of an DOMNodeList read out by a xpath string.

Parameters

$path
string
$path xpath string
$nodeKey
integer
$nodeKey node key (optional, default: 0)

Returns

DOMNode
public string
# getXpathValue( string $path, integer $nodeKey = 0 )

Returns the value of an DOMNode read out by a xpath string.

Returns the value of an DOMNode read out by a xpath string.

Parameters

$path
string
$path xpath string
$nodeKey
integer
$nodeKey node key (optional, default: 0)

Returns

string
value of DOMNode
public integer
# countXpathNodes( string $path )

Returns the amount of nodes in a given XPath string.

Returns the amount of nodes in a given XPath string.

Parameters

$path
string
$path XPath string

Returns

integer
amount of nodes in node list
protected string
# _decode( string $value )

Decodes the value if XML document has not UTF-8 encoding.

Decodes the value if XML document has not UTF-8 encoding.

Parameters

$value
string
$value value to decode

Returns

string
decoded value
Methods inherited from cXmlBase
_createDocument(), _initXpathInstance(), arrayToXml(), getDomDocument(), getEncoding(), getLevelXpath(), registerXpathNamespace(), resolvePath(), setDomDocument(), xmlStringToArray(), xmlToArray()
Properties inherited from cXmlBase
$_dom, $_xpath
CMS CONTENIDO 4.9.1 API documentation generated by ApiGen 2.8.0