Difference between revisions of "Function xml.check()"
Jump to navigation
Jump to search
(Založena nová stránka s textem „{{DISPLAYTITLE:function xml.check()}} Tests if string is well-formed XML. <i>boolean</i> <b>xml.check</b>(<code>xmlstring</code>) === Parameters === * <i…“) |
(No difference)
|
Revision as of 16:06, 21 April 2017
Tests if string is well-formed XML.
boolean xml.check(xmlstring
)
Parameters
- string
xmlstring
string to escape
Return value
boolean
- true if
xmlstring
is well-formed xml - false if not
Usage
local badnode = "<note>".."3<5".."</note>" local goodnode = "<note>"..xml.escape("3<5").."</note>" log(tostring(xml.check(badnode))) -- false log(tostring(xml.check(goodnode))) -- true
See also
- xml.escape() to xml-escape string