NAME
std/data/kdl/xml - XML-in-KDL structure conversion.
SYNOPSIS
from std/data/kdl import KDL;
from std/data/kdl/xml import kdl_to_xml, xml_to_kdl;
from std/data/xml import XML;
let kdl_doc := ( new KDL() ).decode(
"a href=\"http://example.com\" \"here's a link\""
);
let xml_doc := kdl_to_xml(kdl_doc);
let roundtrip := xml_to_kdl(xml_doc);
IMPLEMENTATION SUPPORT
This module is supported by all implementations of ZuzuScript.
DESCRIPTION
This module implements the XML-in-KDL (XiK) mapping for parsed Zuzu objects. kdl_to_xml accepts a KDLDocument or KDLNode and returns an XMLDocument. xml_to_kdl accepts an XMLDocument or XMLNode and returns a KDLDocument.
EXPORTS
Functions
kdl_to_xml(value)Parameters:
valueis aKDLDocument,KDLNode, or compatible KDL value. Returns:XMLDocument. Converts XML-in-KDL structures into an XML document.xml_to_kdl(value)Parameters:
valueis anXMLDocument,XMLNode, or compatible XML value. Returns:KDLDocument. Converts XML data into XML-in-KDL nodes.
COPYRIGHT AND LICENCE
std/data/kdl/xml is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.