Static Public Member Functions | |
static | contentFromXML ($input) |
Decode content stored as XML. | |
static | contentToXML ($input) |
Encode content for storage as XML. | |
static | formatXML ($xml, $highlight=false, $lineNumbers=false) |
Formats XML, optionally adding syntax highlighting. | |
static | parse ($xml, $intoDOM=false) |
Parse an XML string and catch any parsing errors. | |
static | validateXML ($xml, $useSchema=true) |
Validates XML for well-formedness and against Shodor schema. |
static SXMLHelper::contentFromXML | ( | $ | input | ) | [static] |
Decode content stored as XML.
Replace all XML entity encodings with the characters they represent
$input | [string]: An XML string |
static SXMLHelper::contentToXML | ( | $ | input | ) | [static] |
Encode content for storage as XML.
Replace all XML illegal characters with the proper entity encodings
$input | [string]: A string of content to be made safe for XML |
static SXMLHelper::formatXML | ( | $ | xml, | |
$ | highlight = false , |
|||
$ | lineNumbers = false | |||
) | [static] |
Formats XML, optionally adding syntax highlighting.
$xml | [string]: XML to format |
static SXMLHelper::parse | ( | $ | xml, | |
$ | intoDOM = false | |||
) | [static] |
Parse an XML string and catch any parsing errors.
Use this static function to help with XML parsing. All parse errors are caught and sent to SErrorManager.
$xml | [string]: A string of XML |
static SXMLHelper::validateXML | ( | $ | xml, | |
$ | useSchema = true | |||
) | [static] |
Validates XML for well-formedness and against Shodor schema.
Validation against Shodor schema is optional. If there is an error, an array of error information is returned. Each entry in the return array is an array containing four entries:
$xml | [string]: String of XML to validate | |
$useSchema | [boolean]: If true, validate XML against Shodor schema (default) |