class Xml

Xml Parser $data = $xml->setNormal($is_normal)->parse($xml);

Methods

__construct()

Xml constructor.

destruct()

释放指定的 XML 解析器

array|string
parse(string $data)

解析

open(mixed $parser, mixed $tag, mixed $attributes)

打开

data(mixed $parser, string $data)

数据

close(mixed $parser, mixed $tag)

关闭

$this
setNormal(mixed $is_normal)

设置 normal

string|string[]|null
format(array $arr, bool $html_on = false, string $root = 'root', string $item = 'item', int $level = 1)

格式化

Details

at line 73
__construct()

Xml constructor.

at line 85
destruct()

释放指定的 XML 解析器

at line 95
array|string parse(string $data)

解析

Parameters

string $data 要解析数据

Return Value

array|string

at line 109
open(mixed $parser, mixed $tag, mixed $attributes)

打开

Parameters

mixed $parser parser
mixed $tag tag
mixed $attributes attributes

at line 139
data(mixed $parser, string $data)

数据

Parameters

mixed $parser parser
string $data data

at line 151
close(mixed $parser, mixed $tag)

关闭

Parameters

mixed $parser parser
mixed $tag tag

at line 168
$this setNormal(mixed $is_normal)

设置 normal

Parameters

mixed $is_normal is_normal

Return Value

$this

at line 184
string|string[]|null format(array $arr, bool $html_on = false, string $root = 'root', string $item = 'item', int $level = 1)

格式化

Parameters

array $arr arr
bool $html_on html_on
string $root root
string $item item
int $level level

Return Value

string|string[]|null