(PHP 5, PHP 7)
はじめに
XML ドキュメントの要素をあらわします。
クラス概要
SimpleXMLElement implements Traversable {
final public __construct
( string $data
[, int $options
= 0
[, bool $data_is_url
= false
[, string $ns
= ""
[, bool $is_prefix
= false
]]]] )
public addAttribute
( string $name
[, string $value
[, string $namespace
]] ) : void
public addChild
( string $name
[, string $value
[, string $namespace
]] ) : SimpleXMLElement
public attributes
([ string $ns
= null
[, bool $is_prefix
= false
]] ) : SimpleXMLElement
public children
([ string $ns
[, bool $is_prefix
= false
]] ) : SimpleXMLElement
public count ( ) : int
public getDocNamespaces
([ bool $recursive
= false
[, bool $from_root
= true
]] ) : array
public getName ( ) : string
public getNamespaces
([ bool $recursive
= false
] ) : array
public registerXPathNamespace
( string $prefix
, string $ns
) : bool
public __toString ( ) : string
public xpath
( string $path
) : array
}
目次
- SimpleXMLElement::addAttribute — SimpleXML 要素に属性を追加する
- SimpleXMLElement::addChild — XML ノードに子要素を追加する
- SimpleXMLElement::asXML — SimpleXML 要素に基づき整形式の XML 文字列を返す
- SimpleXMLElement::attributes — 要素の属性を定義する
- SimpleXMLElement::children — 指定したノードの子ノードを見付ける
- SimpleXMLElement::__construct — 新しい SimpleXMLElement オブジェクトを作成する
- SimpleXMLElement::count — 子要素を数える
- SimpleXMLElement::getDocNamespaces — ドキュメントで宣言されている名前空間を返す
- SimpleXMLElement::getName — XML 要素の名前を取得する
- SimpleXMLElement::getNamespaces — ドキュメントで使用している名前空間を返す
- SimpleXMLElement::registerXPathNamespace — 次の XPath クエリ用の prefix/ns コンテキストを作成する
- SimpleXMLElement::saveXML — SimpleXMLElement::asXML のエイリアス
- SimpleXMLElement::__toString — 文字列で要素の内容を返す
- SimpleXMLElement::xpath — XML データに Xpath クエリを実行する
/* メソッド */