# xmlEncode

    text xmlEncode(value, flags, namespaces)

Translates the value into application/xml format (XML).

Flags:

Flag | Description
--- | ---
`"0"` | value must use the unordered structure, the default
`"1"` | value must use the ordered structure
`"i"` | Indent output (2 spaces)
`"n"` | Process namespaces, value should use qualified element and attribute names (with prefixes)
`"o"` | Omit XML declaration

See the xmlDecode function for a description of the unordered and ordered structure.

## Parameters

1. value — structured dictionary or a text to encode to XML.
2. flags — optional text where each character is a flag.
3. namespaces — optional dictionary with namespace URI to prefix mappings.

## Returns

- the value encoded as an XML text.