XmlArchive.unarchiveAssociativeArrayValue

Unarchives an associative array value.

There are separate methods for unarchiving associative array keys and values because both the key and the value can be of arbitrary type and needs to be unarchived on its own.

class XmlArchive(U = char)
void
unarchiveAssociativeArrayValue
(
string key
,
void delegate
()
dg
)

Parameters

key string

the key associated with the value

dg void delegate
()

a callback that performs the actual unarchiving of the value

Examples

auto archive = new XmlArchive!();
archive.beginUnarchiving(data);

for (size_t i = 0; i < length; i++)
{
    unarchiveAssociativeArrayValue(to!(string(i), {
        // unarchive the value
    }));
}

The for statement in the above example would most likely be executed in the callback passed to the unarchiveAssociativeArray method.

See Also

unarchiveAssociativeArrayKey unarchiveAssociativeArray

Meta