This can be used to set the desired serialization mode when using the plugin through
its serialization interface. You have to pass the
desired serialization mode in the mode
argument. The following serialization modes
are currently supported:
#XML_SERIALIZEMODE_LIST
-
This will store all XML nodes as sequential list items inside
the table. The first XML node will be at index 0, the second at index 1, and so
on. This is the default mode. See List serialization for details.
#XML_SERIALIZEMODE_NAMED
-
This will store all XML nodes as named items inside the table.
This means that you can conveniently access nodes by their name instead of having
to use numeric indices. The disadvantage of this mode is that you can't have
multiple nodes of the same name on the same level because the nodes are stored
by name and each name is only available once per node level. Another disadvantage is
that you don't have control over the order of the nodes when serializing them back
to an XML document. See Named serialization for details.
#XML_SERIALIZEMODE_HOLLYWOOD
-
This is a special mode that allows you to serialize
arbitrary Hollywood tables. In contrast to the first two modes, Hollywood mode
doesn't require the table to follow a certain layout. You can serialize any
table in this mode, just as you can with Hollywood's
ReadTable()
and
WriteTable()
functions. The table can even contain binary data or code like
Hollywood functions. See Hollywood serialization for details.
Further options can be configured using the xml.SetSerializeOptions()
command. See xml.SetSerializeOptions() for details.