{ "ns" : "http://zorba.io/modules/xml", "description" : "
\n This module provides functions for reading XML files from string inputs.\n It allows reading of well-formed XML documents as well as well-formed\n external parsed entities, described by\n XML 1.0 Well-Formed\n Parsed Entities. The functions can also perform Schema and DTD\n validation of the input documents.\n
\nThe following example parses a sequence of XML elements and returns\n them in a streaming fashion - each at a time:
\n\n import module namespace x = \"http://zorba.io/modules/xml\";\n import schema namespace opt = \"http://zorba.io/modules/xml-options\";\n x:parse(\n \"<from1>Jani</from1><from2>Jani</from2><from3>Jani</from3>\",\n <opt:options>\n <opt:parse-external-parsed-entity/>\n </opt:options>\n )\n\n
Another useful option allows to skip an arbitrary number of levels\n before returning a sequence of nodes as shown in the following example:
\n\n import module namespace x = \"http://zorba.io/modules/xml\";\n import schema namespace opt = \"http://zorba.io/modules/xml-options\";\n x:parse(\n \"<root>\n <from1>Jani1</from1>\n <from2>Jani2</from2>\n <from3>Jani3</from3>\n </root>\",\n <opt:options>\n <opt:parse-external-parsed-entity opt:skip-root-nodes=\"1\"/>\n </opt:options>\n )\n\n", "sees" : [ "
A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by Canonical XML.
\nNote: This function is not streamable. If a streamable string is used\n as input for the function it will be materialized.
\nNote: This function sets the\n XML_PARSE_NOERROR\n option when parsing the XML input.
\n", "summary" : "A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by Canonical XML .
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml-string", "type" : "xs:string", "occurence" : null, "description" : "A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by Canonical XML.
\nThis version of the function allows specifying certain options to be\n used when initially parsing the XML string. These are of the same form\n as the options to x:parse#2(), although the following options are\n currently ignored for this function:\n
Note: This function is not streamable, if a streamable string is used\n as input for the function it will be materialized.
\nNote: This function sets the\n XML_PARSE_NOERROR\n option when parsing the XML input.
\n", "summary" : "A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by Canonical XML .
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml-string", "type" : "xs:string", "occurence" : null, "description" : "A function to parse XML files and fragments (i.e.\n external general parsed\n entities).
\nThe functions takes two arguments: the first one is the\n string to be parsed and the second argument is an <options/> element that\n passes a list of options to the parsing function. They are described below.\n The options element must conform to the xml-options:options element type\n from the xml-options.xsd schema. Some of these\n will be passed to the underlying library (LibXml2) and further documentation\n for them can be found at \n LibXml2 parser.
\n The list of available options:\n\n An example that sets the base-uri of the parsed external entities:\n
\n\n import module namespace x = \"http://zorba.io/modules/xml\";\n import schema namespace opt = \"http://zorba.io/modules/xml-options\";\n x:parse(\"<from1>Jani</from1><from2>Jani</from2><from3>Jani</from3>\",\n <opt:options>\n <opt:base-uri opt:value=\"urn:test\"/>\n <opt:parse-external-parsed-entity/>\n </opt:options>\n )\n\n", "summary" : "
A function to parse XML files and fragments (i.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml-string", "type" : "xs:string", "occurence" : null, "description" : "