function xml.check()

From wiki.netio-products.com
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