XDM Values, Items, Nodes and supporting functions¶
Contents:
- create_xdm_dict(proc, mmap)¶
Function to create a dictionary of pairs of type (PyXdmAtomicValue, PyXdmValue) from primitive types.
- Parameters:
proc (PySaxonProcessor) – PySaxonProcessor object required to create PyXdmValue objects from primitive types
mmap (dict) – The dict of key-value pairs to convert
- Returns:
Dictionary of (PyXdmAtomicValue, PyXdmValue) pairs
- Return type:
Example
Creating an XDM Map with string keys and Integer atomic values:
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