function xml.check()

From wiki.netio-products.com
Revision as of 15:06, 21 April 2017 by Jturon (talk | contribs) (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…“)
(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(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