Property | Type | Description | |
---|---|---|---|
$simpleXMLElement | Instance of the wrapped SimpleXMLElement object |
Method | 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 ) : |
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 ) : |
Runs XPath query on XML data |
Method | Description | |
---|---|---|
wrapSimpleXMLElement ( |
Wraps the given element into an instance of the wrapper |
public __construct ( string $xmlData ) | ||
$xmlData | string | A well-formed XML string |
public getFirstChildByTagName ( string $tagName ) : |
||
$tagName | string | |
return | The first child matching the tag name or NULL if none found |
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. |
return | boolean | TRUE on success or FALSE on failure. |
public removeNodesMatchingXPath ( string $path ) : void | ||
$path | string | An XPath path |
return | void |
protected wrapSimpleXMLElement ( |
||
$element | Element to be wrapped | |
return | The wrapped element or NULL if the given element is invalid |