phpday 2027 - Call for Papers

DOMNode::C14NFile

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

DOMNode::C14NFile — Canonicalize nodes to a file

Descrizione

public function DOMNode::C14NFile(
    string $uri,
    bool $exclusive = false,
    bool $withComments = false,
    ?array $xpath = null,
    ?array $nsPrefixes = null
): int|false

Canonicalize nodes to a file.

Elenco dei parametri

uri

Path to write the output to.

exclusive

Enable exclusive parsing of only the nodes matched by the provided xpath or namespace prefixes.

withComments

Retain comments in output.

xpath

Un array di XPath con cui filtrare i nodi. Ogni elemento di questo array è un array associativo con:

  • Una chiave obbligatoria query contenente l'espressione XPath sotto forma di stringa.

  • Una chiave opzionale namespaces contenente un array che associa i prefissi dei namespace (chiavi) agli URI dei namespace (valori).

nsPrefixes

An array of namespace prefixes to filter the nodes by.

Valori restituiti

Number of bytes written o false in caso di fallimento

Vedere anche:

User Contributed Notes

There are no user contributed notes for this page.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top