function xml.check()

From wiki.netio-products.com
Revision as of 18:17, 5 May 2017 by Jturon (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Tests if string is well-formed XML.

boolean xml.check(string xml)

Parameters

  • string xml 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