xmlTreeSetRootElement

 

SYNOPSIS

xmlNode xmlTreeSetRootElement(xmlDoc doc, xmlNode element)

Parameters:

  • doc - the xmlDoc to set the root element of

  • element - the element to set as the root of doc

Returns:

  • the old root element (if any)


DESCRIPTION
xmlTreeSetRootElement() sets the root element of doc to element. If there was already a root element, it is removed and returned.


EXAMPLE

<$ret = (xmlTreeSetRootElement($doc, $node))>


SEE ALSO
xmlTreeAddChild, xmlTreeAddChildList, xmlTreeAddNextSibling, xmlTreeAddPrevSibling, xmlTreeAddSibling


Copyright © Thunderstone Software     Last updated: Sep 25 2019
Copyright © 2019 Thunderstone Software LLC. All rights reserved.