PHP Velho Oeste 2024

LibXMLError クラス

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

はじめに

libxml がスローするエラーについてのさまざまな情報を含みます。エラーコードについての説明は、公式の » xmlError API ドキュメント をごらんください。

クラス概要

class LibXMLError {
/* プロパティ */
public int $level;
public int $code;
public int $column;
public string $file;
public int $line;
}

プロパティ

level

エラーの深刻度 (次の定数 LIBXML_ERR_WARNINGLIBXML_ERR_ERROR あるいは LIBXML_ERR_FATAL のいずれか)。

code

エラーコード。

column

エラーが発生した列。

注意:

このプロパティは libxml で完全には実装されておらず、しばしば 0 が返されることがあります。

message

エラーメッセージ (存在する場合)。

file

ファイル名。XML を文字列から読み込んだ場合は空文字列。

line

エラーが発生した行。

add a note add a note

User Contributed Notes 2 notes

up
0
Anonymous
7 years ago
The bug seems to be fixed. Report from mati is here as reference now.
up
-5
mati
10 years ago
If someone wanna use this to parse xml schema and validate it. Look out there is a bug

https://bugs.php.net/bug.php?id=54138

which wont be fixed.
To Top