XDM Values, Items, Nodes and supporting functions

create_xdm_dict(proc, mmap)

Function to create a dictionary of pairs of type (PyXdmAtomicValue, PyXdmValue) from primitive types :param proc: PySaxonProcessor object required to create PyXdmValue objects from primitive types :type proc: PySaxonProcessor :param mmap: The dict of key-value pairs to convert :type mmap: dict

Returns:

Dictionary of (PyXdmAtomicValue, PyXdmValue) pairs

Return type:

dict

Example

from saxoncee import * with PySaxonProcessor(license=False) as saxonproc:

mymap = {“a”:saxonproc.make_integer_value(1), “b”:saxonproc.make_integer_value(2),

“c”:saxonproc.make_integer_value(3)}

xdmdict = create_xdm_dict(saxonproc, mymap) map = saxonproc.make_map(xdmdict)

Raises:

PySaxonApiError – Failure in constructing the dict