File table2xml.lua
Txml to xml conversion. This modules transforms a Txml object in an XML string. COnsider that tag_name or a property name can contain __ that will be converted to the corresponding escape_namespace parameter.
{tag_name = "html__a", xmlns__www="http://.../"}
will be converted to
<html:a xmlns:www="http://.../">
You may prefer writing
{tag_name = "html:a", xmlns__www="http://.../"}
that is mostrly the same, but there is no way to write
{tag_name = "html:a", xmlns:www="http://.../"}
in LUA, so use the __ for attributes. See the xml2table documentation for more infos about Txml.
Functions
| table2xml (t, escape_namespace, encoding, unescape) | Txml2xml conversion. |
Functions
- table2xml (t, escape_namespace, encoding, unescape)
-
Txml2xml conversion.
Parameters
- t:
- escape_namespace: string ":" is the good one, if not provided no namespacing escaping is done, read no __ are converted.
- encoding: string the encoding, default is iso-8859-1.
- unescape: boolean true to not escape XML entities
Return value:
string an XML string.