[xml2lambda]

xml2lambda is a core slot, one of the keywords of the Hyperlambda language, in Hyperlambda, the language of Magic Cloud. Transforms XML into a lambda hierarchy.

  • Value (xml), required: XML text to transform
  • Returns: Resolves to the parsed XML hierarchy as child nodes; attributes are emitted as @name child nodes, text as #text child nodes, and comments/whitespace-only text nodes are omitted

Guide

How to use xml2lambda

JSON declaration

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

JSON declaration
{
  "name": "xml2lambda",
  "description": "Transforms XML into a lambda hierarchy",
  "signature": {
    "input": {
      "kind": "xml",
      "description": "XML text to transform",
      "required": true,
      "mode": "ValueOrExpression"
    },
    "output": {
      "mode": "Lambda",
      "kind": "xml-tree",
      "element-kind": "xml-element",
      "description": "Resolves to the parsed XML hierarchy as child nodes; attributes are emitted as @name child nodes, text as #text child nodes, and comments/whitespace-only text nodes are omitted"
    }
  }
}

← whitelist all core slots yaml2json →