gws.lib.xmlx.util¶
Value conversion and escaping for XML output.
Source code: gws.lib.xmlx.util
Module Contents¶
- gws.lib.xmlx.util.atom_to_string(s) tuple[str, bool]¶
Convert a primitive value to a string for XML output.
Nonebecomes an empty string, numbers and booleans are lowercased (true,false), datetimes and dates are written in ISO format.- Parameters:
s – The value.
- Returns:
A tuple of the string and a flag that is
Falseif the value is not a primitive value.