xmlTreeGetRootElement

SYNOPSIS

xmlNode xmlTreeGetRootElement(xmlDoc doc)

Parameters:

  • doc - the document you want to get the root element from

Returns:

  • the root element of the doc


DESCRIPTION
xmlTreeGetRootElement() gets the root element from the XML document doc. This is the proper way to get the root element (as opposed to xmlTreeGetFirstChild() on the doc), as described in the xmlDoc vs Root Element (here) section.


EXAMPLE

<$root = (xmlTreeGetRootElement($doc))>


SEE ALSO
xmlTreeGetDoc, xmlTreeGetChildren, xmlTreeGetFirstChild, xmlTreeGetNext, xmlTreeGetPrevious, xmlTreeGetParent


Copyright © Thunderstone Software     Last updated: Jun 15 2022
Copyright © 2022 Thunderstone Software LLC. All rights reserved.