[lambda2xml]

lambda2xml is a core slot, one of the keywords of the Hyperlambda language, in Hyperlambda, the language of Magic Cloud. Converts a lambda object to an XML fragment or document.

  • Value (xml-tree), optional: Expression selecting a SINGLE lambda root to transform (XML has exactly one document root)
  • Returns: Resolves to the generated XML string

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
any node name lambda no Nodes to convert, used when the slot has no value. Can be repeated.

Guide

How to use lambda2xml

JSON declaration

This is the complete declaration of lambda2xml, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "lambda2xml",
  "description": "Converts a lambda object to an XML fragment or document",
  "signature": {
    "input": {
      "kind": "xml-tree",
      "description": "Expression selecting a SINGLE lambda root to transform (XML has exactly one document root)",
      "required": false,
      "mode": "Expression"
    },
    "children": {
      "*": {
        "type": "lambda",
        "description": "Nodes to convert, used when the slot has no value",
        "required": false,
        "mode": "SourceLambda",
        "cardinality": "ZeroOrMore",
        "role": "Payload",
        "projection": "Self"
      }
    },
    "output": {
      "mode": "Value",
      "kind": "xml,text",
      "description": "Resolves to the generated XML string"
    }
  }
}

← lambda2json all core slots lambda2yaml →