The SimpleXMLElement class

(PHP 5, PHP 7, PHP 8)

简介

Represents an element in an XML document.

类摘要

SimpleXMLElement implements Traversable {
/* 方法 */
public __construct ( string $data , int $options = 0 , bool $dataIsURL = false , string $namespaceOrPrefix = "" , bool $isPrefix = false )
public addAttribute ( string $qualifiedName , string $value , string|null $namespace = null ) : void
public addChild ( string $qualifiedName , string|null $value = null , string|null $namespace = null ) : SimpleXMLElement|null
public asXML ( string|null $filename = null ) : string|bool
public attributes ( string|null $namespaceOrPrefix = null , bool $isPrefix = false ) : SimpleXMLElement|null
public children ( string|null $namespaceOrPrefix = null , bool $isPrefix = false ) : SimpleXMLElement|null
public count ( ) : int
public getDocNamespaces ( bool $recursive = false , bool $fromRoot = true ) : array|false
public getName ( ) : string
public getNamespaces ( bool $recursive = false ) : array
public registerXPathNamespace ( string $prefix , string $namespace ) : bool
public __toString ( ) : string
public xpath ( string $expression ) : array|null|false
}

目录