\Nano4\UtilsXML

Common XML Functions.

I like SimpleXML, it's, well, simple. Sometimes however, it's too simple and I need some DOM-juice to turn it up a notch. Well, this is a collection of common functions that may need that extra power.

Summary

Methods
Properties
Constants
append()
appendText()
renameElement()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

append()

append(object  $parent, object  $child) : boolean

Append one node to another.

Parameters

object $parent

A SimpleXMLElement or DOMElement object.

object $child

A SimpleXMLElement or DOMElement to append.

Returns

boolean —

Returns false if invalid params were passed.

appendText()

appendText(object  $parent, string  $text) : boolean

Append a text node to an element.

Parameters

object $parent

A SimpleXMLElement or DOMElement object.

string $text

The text to append as a DOMTextNode.

Returns

boolean —

Returns false if invalid params were passed.

renameElement()

renameElement(  $oldNode,   $newName,   $opts = array()) 

Rename an element.

Parameters

$oldNode
$newName
$opts