function xml.check()
Jump to navigation
Jump to search
Tests if string is well-formed XML.
boolean xml.check(xmlstring)
Parameters
- string
xmlstringstring to escape
Return value
boolean
- true if
xmlstringis 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