PHP Class Box\Spout\Reader\Wrapper\SimpleXMLElement

.. Instead, it is used as a passthrough.
See also: SimpleXMLElement
Inheritance: use trait Box\Spout\Reader\Wrapper\XMLInternalErrorsHelper
Afficher le fichier Open project: box/spout Class Usage Examples

Protected Properties

Свойство Type Description
$simpleXMLElement Instance of the wrapped SimpleXMLElement object

Méthodes publiques

Méthode Description
__construct ( string $xmlData ) Creates a new SimpleXMLElement object
__toString ( ) : string
getAttribute ( string $name, string | null | void $namespace = null ) : string | null Returns the attribute for the given name.
getFirstChildByTagName ( string $tagName ) : SimpleXMLElement | null Returns the first child matching the given tag name
registerXPathNamespace ( string $prefix, string $namespace ) : boolean Creates a prefix/ns context for the next XPath query
removeNodesMatchingXPath ( string $path ) : void Remove all nodes matching the given XPath query.
xpath ( string $path ) : SimpleXMLElement[] | boolean Runs XPath query on XML data

Méthodes protégées

Méthode Description
wrapSimpleXMLElement ( SimpleXMLElement $element ) : SimpleXMLElement | null Wraps the given element into an instance of the wrapper

Method Details

__construct() public méthode

Creates a new SimpleXMLElement object
See also: SimpleXMLElement::__construct
public __construct ( string $xmlData )
$xmlData string A well-formed XML string

__toString() public méthode

public __toString ( ) : string
Résultat string

getAttribute() public méthode

Returns the attribute for the given name.
public getAttribute ( string $name, string | null | void $namespace = null ) : string | null
$name string Attribute name
$namespace string | null | void An optional namespace for the retrieved attributes
Résultat string | null The attribute value or NULL if attribute not found

getFirstChildByTagName() public méthode

Returns the first child matching the given tag name
public getFirstChildByTagName ( string $tagName ) : SimpleXMLElement | null
$tagName string
Résultat SimpleXMLElement | null The first child matching the tag name or NULL if none found

registerXPathNamespace() public méthode

Creates a prefix/ns context for the next XPath query
See also: SimpleXMLElement::registerXPathNamespace
public registerXPathNamespace ( string $prefix, string $namespace ) : boolean
$prefix string The namespace prefix to use in the XPath query for the namespace given in "namespace".
$namespace string The namespace to use for the XPath query. This must match a namespace in use by the XML document or the XPath query using "prefix" will not return any results.
Résultat boolean TRUE on success or FALSE on failure.

removeNodesMatchingXPath() public méthode

It does not map to any \SimpleXMLElement function.
public removeNodesMatchingXPath ( string $path ) : void
$path string An XPath path
Résultat void

wrapSimpleXMLElement() protected méthode

Wraps the given element into an instance of the wrapper
protected wrapSimpleXMLElement ( SimpleXMLElement $element ) : SimpleXMLElement | null
$element SimpleXMLElement Element to be wrapped
Résultat SimpleXMLElement | null The wrapped element or NULL if the given element is invalid

xpath() public méthode

Runs XPath query on XML data
See also: SimpleXMLElement::xpath
public xpath ( string $path ) : SimpleXMLElement[] | boolean
$path string An XPath path
Résultat SimpleXMLElement[] | boolean an array of SimpleXMLElement objects or FALSE in case of an error.

Property Details

$simpleXMLElement protected_oe property

Instance of the wrapped SimpleXMLElement object
protected $simpleXMLElement