MINIMIZED

Synopsis

HELP:   Discards comments, insignificant whitespace and whitespace-only sections between tags
TYPE:   OBJECT
SYNTAX: MINIMIZED(MAXWSP=num,WSPERR=WRITE/ABORT,BUFSIZ=num,INICNT=num,WLLFMD)

Description

The minimized method creates an XML document that has whitespace and linebreaks removed unless they are part of other character data, as well as all comments. This is most suitable if data is primarily contained in the child nodes of the XML document, the document is read by a machine and if storage/bandwidth is an issue.

Example: If the original XML document is the following one:

<?xml version="1.0"?>
  <!DOCTYPE root [
    <!ELEMENT root (someelement)>
  ]>
<root>
  <somelement   attribute1="value1" attribute2="value2">
    some text
  </somelement>
  <somelement>
    <!-- comment -->
    text in non-root element
    <leaf>this is a leaf</leaf>
  </somelement>
</root>

then minimization will result in the following document:

<?xml version="1.0"?><!DOCTYPE root [<!ELEMENT root (someelement)>]><root><somelement attribute1="value1" attribute2="value2">
    some text
  </somelement><somelement>

    text in non-root element
    <leaf>this is a leaf</leaf></somelement></root>

Arguments