总有人间一两风,填我十万八千梦

PHP xml_get_current_byte_index 用法 手册 | 示例代码

PHP开发手册 归档 404℃ 0评论

xml_get_current_byte_index

(PHP 4, PHP 5, PHP 7)

xml_get_current_byte_index获取 XML 解析器的当前字节索引

说明

xml_get_current_byte_index ( resource $parser ) : int

获取指定的 XML 解析器的当前字节索引(current byte index)。

参数

parser

指向要取得字节索引的 XML 解析器的引用。

返回值

如果 parser 没有指向一个合法的解析器,该函数将返回 FALSE,否则将返回解析器当前在其数据缓冲区中的字节索引(起始值为 0)。

注释

Warning

该函数将返回根据UTF-8编码的文本的字节索引,而不论输入是否是其他的编码。

参见

  • xml_get_current_column_index()
  • xml_get_current_line_index()

用户贡献的笔记

turan dot yuksel at tcmb dot gov dot tr

The outcome of this function is heavily dependent on the parser implementation used. For example, at the point where the start_element_ callback is called, libxml2 parser consumes the entire element name and attributes, however expat does not.

转载请注明:悠然品鉴 » PHP xml_get_current_byte_index 用法 手册 | 示例代码

喜欢 (0)or分享 (0)
发表我的评论
取消评论

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址