XmlValidator
class XmlValidator (View source)
Class XmlValidator.
Validates XML against XSD
Properties
protected DOMDocument | $domDocument | DOM Document. |
|
protected string | $xsd | XML Schema Definition. |
Methods
__construct()
Constructor.
bool
is_valid(string $xmlStr, bool $ignoreHtml = true)
Check if a string is valid XML.
array
validate(string $xmlStr, string $xsdFilePath, int $flags = 0, bool $checkXml = false)
Validate XML string.
mixed
getElement($message)
Get element from message.
string
getMessage($message)
Get refined message.
Details
__construct()
Constructor.
bool
is_valid(string $xmlStr, bool $ignoreHtml = true)
Check if a string is valid XML.
array
validate(string $xmlStr, string $xsdFilePath, int $flags = 0, bool $checkXml = false)
Validate XML string.
protected mixed
getElement($message)
Get element from message.
protected string
getMessage($message)
Get refined message.