Revision [1041]

This is an old revision of SerializationOptions made by DavidLee on 2009-11-25 18:13:17.


Serialization and Parsing options

There are several global (shell scope) options that control serialization and parsing. These control default parameters used whenever plain text is parsed into XML , and when XML is serialized to text.

Most commands (where noted) can also accept these options which override the shell options for just that command.

Parsing Options

The following global parsing options may be set by the set command.

-text-encoding encodingThe default encoding any time that text is encountered and otherwise the encoding is not known. Defaults to the java file.encoding property.
-encoding encodingsets both the text-encoding and xml-encoding option
-supports-dtdindicates if the parser should support DTD validation

Serializing Options

The following global serialization options may be set by the set command. These may be overwritten by specific commands.

-omit-xml-declarationOmit the leading xml declaration.
-indentIndent text serialized xml for more human friendly output
-xml-encoding encodingDefault encoding used for serialized xml
-content-type typespecifies the content type
-method output-methodspecifies the output method, must be one of (text,html,xml,xhtml)

Options without arguments can be preceded by a + instead of a - to inverse the setting.



Indentation is controlled with the -indent option. Default is indentation.

xecho <[ <foo><bar/></foo> ]>


xecho +indent <[ <foo><bar/></foo> ]>


Example of setting +indent globally using the set command
set +indent
xecho <[ <foo><bar/></foo> ]>


There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki