XML_Tree::&addRoot

XML_Tree::&addRoot – ルートノードの追加をする

Synopsis

require_once "XML/Tree.php";

object XML_Tree_Node XML_Tree::&addRoot ( string $name , string $content='' , array $attributes=array() )

Description

XMLデータ構造に新たなルートノードを追加します。

Parameter

  • string $name - ルート要素名です。

  • string $content - 開始と終了タグの間のデータです。

  • array $attributes - タグに追加する属性です。 属性名は配列キーが、配列キーへのエントリが属性値を現します。

Return value

object XML_Tree_Node - ルートノードへのリファレンスです。

Note

This function can not be called statically.

Example

&addRoot()の使用法

<?php
$tree  
= new XML_Tree;
$root =& $tree->addRoot("root");
?>
コンストラクタ (Previous) 子ツリーを挿入するう (Next)
Last updated: Fri, 25 May 2012 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.