xml.written

function

Library: XML serializer (OMXMLWRITE)
Import : omxmlwrite.xmd

Returns:


Declaration
export string source function
   written empty-tags value switch        empty-tags  optional initial { true }
           utf-8      value switch        utf-8       optional initial { false }
           from       value markup source input
      

Argument definitions

input
markup event stream that will be converted to XML
empty-tags
indicates whether an empty tag should be written as <empty/> or as <empty></empty>
utf-8
indicates if the non-ASCII characters should be encoded as UTF-8 or as numerical character references


Purpose

The markup source function xml.written converts the input markup stream provided as its input argument into well-formed XML. The following example demonstrates how the function can be used to write an XML file.

  import "omxmlwrite.xmd" prefixed by xml.
  
  process
     do xml-parse scan #main-input
        set file "output.xml" to xml.written from #content
     done

Other Library Functions