function makeSimpleNodeFactory(fixedNodeName, fixedNamespaceURI) {
  return (
    /**
     * @param {*} value Value.
     * @param {Array<*>} objectStack Object stack.
     * @param {string} [newNodeName] Node name.
     * @return {Node} Node.
     */
    function (value, objectStack, newNodeName) {
      const context = /** @type {NodeStackItem} */ (
        objectStack[objectStack.length - 1]
      );
      const node = context.node;
      let nodeName = fixedNodeName;
      if (nodeName === undefined) {
        nodeName = newNodeName;
      }

      const namespaceURI =
        fixedNamespaceURI !== undefined ? fixedNamespaceURI : node.namespaceURI;
      return createElementNS(namespaceURI, /** @type {string} */ (nodeName));
    }
  );
}
Create a node factory which can use the `keys` passed to
{@link module:ol/xml.serialize} or {@link module:ol/xml.pushSerializeAndPop} as node names,
or a fixed node name. The namespace of the created nodes can either be fixed,
or the parent namespace will be used.
@param {string} [fixedNodeName] Fixed node name which will be used for all
    created nodes. If not provided, the 3rd argument to the resulting node
    factory needs to be provided and will be the nodeName.
@param {string} [fixedNamespaceURI] Fixed namespace URI which will be used for
    all created nodes. If not provided, the namespace of the parent node will
    be used.
@return {function(*, Array<*>, string=): (Node|undefined)} Node factory.