klyn.io.xml.dom.XMLSerializer.documentFrom
method
public static documentFrom(value as Object, rootName as String = "object", exclude as List<String> = null) as XMLDocument:
Description

Converts a value to a DOM document. Scalars become text, maps become named children, and lists become item elements. Other objects expose their public instance properties.

Parameters
ParameterDescription
valueSource value.
rootNameRoot element name.
excludeOptional list of top-level members to skip.
Returns

DOM document containing the value.

Example
document = XMLSerializer.documentFrom(user, "User")