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.
xml_get_current_byte_index
(PHP 4, PHP 5)
xml_get_current_byte_index — XML パーサのカレントのバイトインデックスを得る
説明
int xml_get_current_byte_index
( resource $parser
)
指定した XML パーサのカレントのバイトインデックスを取得します。
パラメータ
- parser
-
バイトインデックスを得る XML パーサへのリファレンス。
返り値
この関数は、parser が有効なパーサを参照しない場合に FALSE、そうでない場合に データバッファにおいてパーサが現在処理中のバイトインデックス (先頭が 0) を返します。
注意
警告
この関数は、UTF-8 エンコードされたテキストに基づいたバイトインデックスを返します。 入力が他のエンコーディングであっても無視します。
参考
- xml_get_current_column_number() - XML パーサのカレントのカラム番号を取得する
- xml_get_current_line_number() - XML パーサのカレントの行番号を得る
xml_get_current_byte_index
turan dot yuksel at tcmb dot gov dot tr
20-Sep-2005 10:38
20-Sep-2005 10:38
