serialize
XML Technologies
Release Notes
attachGoldenThread
cast
copy
cutGoldenThread
cwu
delete
dpml
dump
entrypoint
exists
expire
fls
guid
hotRestart
HTTPCookie
HTTPRedirect
isUnix
locationToXPath
lock/unlock
log
loglevel
luceneIndex
luceneSearch
mapper
mapper-export
md5
mls
netkernel:*
new
Orchextra
org.ten60.util.aspell
org.ten60.util.image.SVG2PNG
org.ten60.util.image.Text2PNG
org.ten60.util.image.xchart
plainTextToXHTML
regex
relativizeURI
requestWithArgs
resolveURI
serialize
sleep
sqlBatch
sqlBooleanQuery
SQLEncodeElement
SQLEscapeXML
sqlQuery
sqlUpdate
stm
stopWatch
StringToCanonicalString
throw
toRelaxNG
trace
validateDTD
validateRNG
validateSchematron
validateXSD
xacml
xform
XHREFlinker
XHTMLredirect
XHTMLTidy
xinclude
xmltidy
xpatheval
xpur
xquery
xrl
xsign
xslfo-fop
xslfo-fop
xslt
xverify
License
Change History
NetKernel History
Acknowledgements

serialize

Used to control serialization of an XML document.

Module

urn:org:ten60:netkernel:ext:xml:ura

Definition

Format

<instr>
  <type>serialize</type>
  <operand>foo.xml</operand>
  <operator>
    <serialize>
      <indent />
      <encoding>iso-8859-1</encoding>
    </serialize>
  </operator>
  <target>this:response</target>
</instr>

Syntax

ElementRulesDescription
typeMandatory serialize
operandMandatory the XML document to serialize
operatorMandatory the serialization options
targetMandatory the target resource

The serialize accessor may be used to provide tightly controlled serialization of an XML document. The serialization options are provided by the operator.

NetKernel transparently handles XML serialization operations defaulting to an indented, UTF-8 encoding. If you wish to use a different encoding or indentation then the serialize accessor can be used.

Generally serialize is only needed as the final stage of an XML process and usually targets this:response.

Operator Syntax

The operator provides the serialization options.

<serialize>
  <indent />
  <indent-size>8</indent-size>
  <encoding>UTF-8</encoding>
  <omit-declaration />
</serialize>

indent specifies that indentation should be used. If this option is omitted indentation is not used.
indent-size sets the number of characters to use for an indent. Ignored if indent not set.
encoding specifies the character stream encoding. Defaults to UTF-8 if omitted. Supports UTF-8, UTF-16, iso-8859-1 etc
omit-declaration if specified omits the <?xml version="1.0" encoding="xxxxx"?> declaration.


(C) 2003, 1060 Research Limited
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited