Dutch PHP Conference 2025 - Call For Papers

XMLReader::setSchema

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

XMLReader::setSchemaValidate document against XSD

Опис

public XMLReader::setSchema(?string $filename): bool

Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read().

Параметри

filename

The filename of the XSD schema.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Помилки/виключення

Issues E_WARNING if libxml was built without schema support, the schema contains errors or if XMLReader::read() has already been called.

Примітки

Застереження

Ця функція доступна тільки, якщо PHP зібрано разом з libxml версії 20620 або новішою.

Прогляньте також

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top