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
|
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
|
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
Throws
|
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 [optional, default: 0] node key
Returns
Throws
|
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 [optional, default: 0] node key
Returns
string value of DOMNode
Throws
|
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
Throws
|
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
Throws
|