Xml
class Xml (View source)
XML helpers.
Methods
Load an $actual document into a DOMDocument. This is called from the selector assertions.
Loads an XML (or HTML) file into a DOMDocument object.
Escapes a string for the use in XML documents Any Unicode character is allowed, excluding the surrogate blocks, FFFE, and FFFF (not even as character reference).
Details
at line 47
static DOMDocument
load(string|DOMDocument $actual, bool $isHtml = false, string $filename = '', bool $xinclude = false, bool $strict = false)
Load an $actual document into a DOMDocument. This is called from the selector assertions.
If $actual is already a DOMDocument, it is returned with no changes. Otherwise, $actual is loaded into a new DOMDocument as either HTML or XML, depending on the value of $isHtml. If $isHtml is false and $xinclude is true, xinclude is performed on the loaded DOMDocument.
Note: prior to PHPUnit 3.3.0, this method loaded a file and not a string as it currently does. To load a file into a DOMDocument, use loadFile() instead.
at line 131
static DOMDocument
loadFile(string $filename, bool $isHtml = false, bool $xinclude = false, bool $strict = false)
Loads an XML (or HTML) file into a DOMDocument object.
at line 173
static string
prepareString(string $string)
Escapes a string for the use in XML documents Any Unicode character is allowed, excluding the surrogate blocks, FFFE, and FFFF (not even as character reference).
See http://www.w3.org/TR/xml/#charsets
at line 193
static mixed
xmlToVariable(DOMElement $element)
"Convert" a DOMElement object into a PHP variable.