Cameron Laird wrote:
>
> in TclDOM (or tDOM, for that matter)? Will anyone
> else want one I write?
Sorry to steal your thunder, but of course there is!
dom::DOMImplementation serialize accepts the -indent and
-indentspec arguments.
-indent can have the value "yes" ("true" or "on") or
"no" ("false" or "off"). NB. DON'T use 0 or 1.
This option enables (disables) indenting element content
that is element-only content.
The -indentspec option controls how whitespace is used to
do the indenting, and is a RE+replacement string. The default is
to replace sequence of eight spaces with a tab character.
For example:
dom::DOMImplementation serialize $doc -indent yes
There's also the (cruder) -newline option.
Cheers,
Steve Ball
--
Steve Ball | waX Me Lyrical XML Editor | Training & Seminars
Zveno Pty Ltd | Web Tcl Complete | XML XSL
http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development
Ste...@zv... +---------------------------+---------------------
Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099
|