*
* @access public
*/
- function &getRoot()
+ function getRoot()
{
if (!is_null($this->root)) {
return $this->root;
* @return object XML_Tree_Node Reference to the newly created root node
* @access public
*/
- function &addRoot($name, $content = '', $attributes = array(), $lineno = null)
+ function addRoot($name, $content = '', $attributes = array(), $lineno = null)
{
$this->root = new XML_Tree_Node($name, $content, $attributes, $lineno);
return $this->root;
* @access public
* @see getNodeAt()
*/
- function &insertChild($path, $pos, $child, $content = '', $attributes = array())
+ function insertChild($path, $pos, $child, $content = '', $attributes = array())
{
$parent =& $this->getNodeAt($path);
if (PEAR::isError($parent)) {
* @access public
* @see getNodeAt()
*/
- function &removeChild($path, $pos)
+ function removeChild($path, $pos)
{
$parent =& $this->getNodeAt($path);
if (PEAR::isError($parent)) {
* @return mixed The XML tree root (an XML_Tree_Node), or PEAR_Error upon error.
* @access public
*/
- function &getTreeFromString($str)
+ function getTreeFromString($str)
{
$this->folding = false;
$this->XML_Parser(null, 'event');
* @return string Text (XML) representation of the tree
* @access public
*/
- function &get()
+ function get()
{
$out = '<?xml version="' . $this->version . "\"?>\n";
if (!is_null($this->root))
*
* @access public
*/
- function &getName($name) {
+ function getName($name) {
return $this->root->getElement($this->namespace[$name]);
}
* then only the first match is returned.
* @access public
*/
- function &getNodeAt($path)
+ function getNodeAt($path)
{
if (is_null($this->root)){
return $this->raiseError("XML_Tree hasn't a root node");
* @access public
* @author Pierre-Alain Joye <paj@pearfr.org>
*/
- function &getElementsByTagName($tagName)
+ function getElementsByTagName($tagName)
{
if (empty($tagName)) {
return $this->raiseError('Empty tag name');