XMLSerializer
class in package klyn.io.xml.dom

    public class XMLSerializer:

XMLSerializer

Builds and serializes XML DOM trees in pure Klyn.

Example

    import klyn.io.xml.dom

    xml = XMLSerializer.stringify({"answer": 42}, "data", prettyPrint=true, indent=2)
    print(xml)

Methods

Modifier and Type | Member | Description
--- | --- | ---
public static | documentFrom `documentFrom(value as Object, rootName as String = "object", exclude as List<String> = null) as XMLDocument:` | Converts a value to a DOM document.
public static | documentFromMap `documentFromMap(value as Map<String, Object>, rootName as String = "object", exclude as List<String> = null) as XMLDocument:` | Converts a map to a DOM document.
public static | documentFromObject `documentFromObject(value as Object, rootName as String = "object", exclude as List<String> = null) as XMLDocument:` | Converts an object's public properties to a DOM document.
public static | serialize `serialize(node as Node, prettyPrint as Boolean = true, indent as Int = 4) as String:` | Serializes a DOM node to XML text.
public static | stringify `stringify(value as Object, rootName as String = "object", exclude as List<String> = null, prettyPrint as Boolean = true, indent as Int = 4) as String:` | Converts a value to XML text.
public static | stringifyMap `stringifyMap(value as Map<String, Object>, rootName as String = "object", exclude as List<String> = null, prettyPrint as Boolean = true, indent as Int = 4) as String:` | Converts a map to XML text.