XmlHelpers
final class XmlHelpers
| internal |
Runtime utilities for handling XML.
Constants
| private ReNameStart |
|
| private ReName |
|
Methods
static string
escapeText(mixed $s)
Escapes string for use everywhere inside XML (except for comments and tags).
static string
escapeAttr(mixed $s)
Escapes string for use inside XML attribute value.
static string
escapeTag(mixed $s)
Escapes string for use inside XML tag.
static string
formatAttribute(string $namePart, mixed $value, bool $migrationWarnings = false)
Formats an XML attribute.
static string
validateTagChange(mixed $name, string|null $origName = null)
Checks that the HTML tag name can be changed.
static void
validateAttributeName(mixed $name)
Validates that the XML attribute name is a valid XML Name.
Details
at line 30
static string
escapeText(mixed $s)
Escapes string for use everywhere inside XML (except for comments and tags).
at line 47
static string
escapeAttr(mixed $s)
Escapes string for use inside XML attribute value.
at line 59
static string
escapeTag(mixed $s)
Escapes string for use inside XML tag.
at line 73
static string
formatAttribute(string $namePart, mixed $value, bool $migrationWarnings = false)
Formats an XML attribute.
at line 89
static string
validateTagChange(mixed $name, string|null $origName = null)
Checks that the HTML tag name can be changed.
at line 105
static void
validateAttributeName(mixed $name)
Validates that the XML attribute name is a valid XML Name.