Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Worked on the asXML documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tabs
Files: files | file ages | folders
SHA3-256: 66cae3c79420fe71f86afae60dce66a6334131dba4e02ff07af9725b7debcabb
User & Date: rolf 2020-07-23 01:00:28
Context
2020-07-23
01:03
Added -indent value "tab" to asXML and asJSON. check-in: 0118a1190b user: rolf tags: trunk
01:00
Worked on the asXML documentation. Closed-Leaf check-in: 66cae3c794 user: rolf tags: tabs
2020-07-22
23:42
Added -indent tabs to asJSON also. check-in: 4f33810032 user: rolf tags: tabs
Changes

Changes to doc/domDoc.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119










120
121
122
123
124
125
126
...
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
...
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x1eae960">NAME</a> · <a href="#SECTid0x1e5ff20">SYNOPSIS</a> · <a href="#SECTid0x1e97f70">DESCRIPTION </a> · <a href="#SECTid0x1efaea0">SEE ALSO</a> · <a href="#SECTid0x1efb230">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x1eae960">NAME</a></h2><p class="namesection">
<b class="names">domDoc - </b><br>Manipulates an instance of a DOM document object</p>
  
  <h2><a name="SECTid0x1e5ff20">SYNOPSIS</a></h2><pre class="syntax">domDocObjCmd <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre><pre class="syntax">domDoc <i class="m">docToken</i> <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>

  <h2><a name="SECTid0x1e97f70">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
object. <i class="m">method</i> indicates a specific method of the document class. These
methods should closely conform to the W3C recommendation "Document Object Model
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>). Look
at these documents for a deeper understanding of the functionality.</p><p>The valid methods are:</p><dl class="commandlist">
        
          <dt>
<b class="method">documentElement</b> ?<i class="m">objVar</i>?</dt>
................................................................................
          <dt><b class="method">getDefaultOutputMethod</b></dt>
          <dd>Returns the default output method of the document. This is
usually a result of a XSLT transformation.</dd>
        

      
        <dt>
<b class="method">asXML</b> <b class="option">?-indent none/1..8?</b> <b class="option">?-channel channelId?</b> <b class="option">?-escapeNonASCII?</b> <b class="option">?-doctypeDeclaration &lt;boolean&gt;?</b> <b class="option">-xmlDeclaration &lt;boolean&gt;?</b> <b class="option">-encString &lt;string&gt;</b> <b class="option">?-escapeAllQuot?</b> <b class="option">?-indentAttrs?</b> <b class="option">?-nogtescape?</b> <b class="option">?-noEmptyElementTag?</b>
</dt>
        <dd>
<p>Returns the DOM tree as an (optional indented) XML
        string or sends the output directly to the given
        channelId.</p>











        <p>If the option <i class="m">-escapeNonASCII</i> is given,
        every non 7 bit ASCII character in attribute values or element
        PCDATA content will be escaped as character reference in
        decimal representation.</p>

        <p>The flag <i class="m">-doctypeDeclaration</i> determines whether
        there will be a DOCTYPE declaration emitted before the first
................................................................................
<i class="m">xpathQuery</i> to the document. The context node of the query is the root
node in the sense of the XPath recommendation (not the document element). The
result can be a string/value, a list of strings, a list of nodes or a list
of attribute name / value pairs. If <i class="m">typeVar</i> is given
the result type name is stored into that variable (empty,
bool, number, string, nodes, attrnodes or mixed).</p>

<p>The argument <i class="m">xpathQuery</i> has to be a valid XPath
expression. However, there is one exception to that rule. Tcl variable
names can appear in the XPath statement at any position where it is
legal according to the rules of the XPath syntax to put an XPath
variable. The value of the variable is substituted for the variable
name. Ignoring the syntax rules of XPath the Tcl variable name may be
any legal Tcl var name: local variables, global variables, array
entries and so on.  The value will always be seen as string literal by
the xpath engine. Cast the value explicitly with the according xpath
functions (number(), boolean()) to another data type, if needed.</p>

<p>The option <i class="m">-namespaces</i> expects a tcl list with prefix /
namespace pairs as argument. If this option is not given, then any
namespace prefix within the xpath expression will be first resolved
against the list of prefix / namespace pairs set with the
selectNodesNamespaces method for the document the node belongs to. If
this fails, then the namespace definitions in scope of the context
node will be used to resolve the prefix. If this option is given, any
namespace prefix within the xpath expression will be first resolved
against that given list (and ignoring the document global prefix /
namespace list). If the list binds the same prefix to different
namespaces, then the first binding will win.  If this fails, then the
namespace definitions in scope of the context node will be used to
resolve the prefix, as usual.</p>

<p>If the <i class="m">-cache</i> option is used with a true value, then the
<i class="m">xpathQuery</i> will be looked up in a document specific cache. If
the query is found, then the stored pre-compiled query will be used.
If the query isn't found, it will be compiled and stored in the cache,
for use in further calls. Please notice, that the <i class="m">xpathQuery</i> as
given as string is used as key for the cache. This means that equal
XPath expressions, which differ only in white space, are treated as
different cache entries. Special care is needed if the XPath
expression includes namespace prefixes or references to tcl variables.
Both namespace prefixes and tcl variable references will be resolved
according to the XML prefix namespace mappings and tcl variable values
at expression compilation time. If the same XPath expression is used
later on in a context with other XML prefix namespace mappings or
values of the used tcl variables, make sure to first remove the
compiled expression from the cache with the help of the
<b class="method">deleteXPathCache</b> method, to force a recompilation.
Without using the <i class="m">-cache</i> option such consideration is never
needed.</p>

<p>Examples:</p>
          <pre class="example">set paragraphNodes [$node selectNodes {chapter[3]//para[@type='warning' or @type='error'} ]
foreach paragraph $paragraphNodes {
    lappend  values [$paragraph selectNodes attribute::type]
}

set doc [dom parse {&lt;doc xmlns="http://www.defaultnamespace.org"&gt;&lt;child/&gt;&lt;/doc&gt;}]
set root [$doc documentElement]
set childNodes [$root selectNodes -namespaces {default http://www.defaultnamespace.org} default:child]</pre>

          </dd>
      

      
        <dt>
<b class="method">baseURI</b> <i class="m">?URI?</i>
</dt>
................................................................................

  </dl><p>Otherwise, if an unknown method name is given, the command with the
same name as the given method within the namespace <tt class="samp">::dom::domDoc</tt> is
tried to be executed. This allows quick method additions on Tcl level.</p><p>Newly created nodes are appended to a hidden fragment list. If they
are not moved into the tree they are automatically deleted as soon as the whole
document gets deleted.</p>

    <h2><a name="SECTid0x1efaea0">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>

    <h2><a name="SECTid0x1efb230">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-DOMnodecreation">DOM node creation</a>, <a class="keyword" href="keyword-index.html#KW-documentelement">document element</a>
</p>

</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>






|


|


|

|







 







|






>
>
>
>
>
>
>
>
>
>







 







|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|

|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
596
597
598
599
600
601
602
603
604
605
606


















































607
608
609
610
611
612
613
...
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5632bcecc630">NAME</a> · <a href="#SECTid0x5632bce02bb0">SYNOPSIS</a> · <a href="#SECTid0x5632bceaad50">DESCRIPTION </a> · <a href="#SECTid0x5632bcf17a00">SEE ALSO</a> · <a href="#SECTid0x5632bcf17d90">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5632bcecc630">NAME</a></h2><p class="namesection">
<b class="names">domDoc - </b><br>Manipulates an instance of a DOM document object</p>
  
  <h2><a name="SECTid0x5632bce02bb0">SYNOPSIS</a></h2><pre class="syntax">domDocObjCmd <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre><pre class="syntax">domDoc <i class="m">docToken</i> <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>

  <h2><a name="SECTid0x5632bceaad50">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
object. <i class="m">method</i> indicates a specific method of the document class. These
methods should closely conform to the W3C recommendation "Document Object Model
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>). Look
at these documents for a deeper understanding of the functionality.</p><p>The valid methods are:</p><dl class="commandlist">
        
          <dt>
<b class="method">documentElement</b> ?<i class="m">objVar</i>?</dt>
................................................................................
          <dt><b class="method">getDefaultOutputMethod</b></dt>
          <dd>Returns the default output method of the document. This is
usually a result of a XSLT transformation.</dd>
        

      
        <dt>
<b class="method">asXML</b> <b class="option">?-indent none/tabs/1..8?</b> <b class="option">?-channel channelId?</b> <b class="option">?-escapeNonASCII?</b> <b class="option">?-doctypeDeclaration &lt;boolean&gt;?</b> <b class="option">-xmlDeclaration &lt;boolean&gt;?</b> <b class="option">-encString &lt;string&gt;</b> <b class="option">?-escapeAllQuot?</b> <b class="option">?-indentAttrs?</b> <b class="option">?-nogtescape?</b> <b class="option">?-noEmptyElementTag?</b>
</dt>
        <dd>
<p>Returns the DOM tree as an (optional indented) XML
        string or sends the output directly to the given
        channelId.</p>

        <p>The -indent option requires "no", "none", "tabs" or a
        natural number betwenn 0 and 8, both included, as value. With
        the values "no" or "none" no additional white space outside of
        markup will be added to the serialization. I. Otherwise, it's
        a "pretty-print" serialization, due to inserting white space
        between end and the next start tag according to the nesting
        level. The level indentation wide is given with the number. If
        the value is "tabs", then indentation is done with tabs, one
        tab per level.</p>
        
        <p>If the option <i class="m">-escapeNonASCII</i> is given,
        every non 7 bit ASCII character in attribute values or element
        PCDATA content will be escaped as character reference in
        decimal representation.</p>

        <p>The flag <i class="m">-doctypeDeclaration</i> determines whether
        there will be a DOCTYPE declaration emitted before the first
................................................................................
<i class="m">xpathQuery</i> to the document. The context node of the query is the root
node in the sense of the XPath recommendation (not the document element). The
result can be a string/value, a list of strings, a list of nodes or a list
of attribute name / value pairs. If <i class="m">typeVar</i> is given
the result type name is stored into that variable (empty,
bool, number, string, nodes, attrnodes or mixed).</p>

          <p>See the documentation of the of the
          <b class="command">domNode</b> command method
          <b class="method">selectNodes</b> for a detailed description of
          the arguments.</p>


















































          </dd>
      

      
        <dt>
<b class="method">baseURI</b> <i class="m">?URI?</i>
</dt>
................................................................................

  </dl><p>Otherwise, if an unknown method name is given, the command with the
same name as the given method within the namespace <tt class="samp">::dom::domDoc</tt> is
tried to be executed. This allows quick method additions on Tcl level.</p><p>Newly created nodes are appended to a hidden fragment list. If they
are not moved into the tree they are automatically deleted as soon as the whole
document gets deleted.</p>

    <h2><a name="SECTid0x5632bcf17a00">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>

    <h2><a name="SECTid0x5632bcf17d90">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-DOMnodecreation">DOM node creation</a>, <a class="keyword" href="keyword-index.html#KW-documentelement">document element</a>
</p>

</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/domDoc.n.

233
234
235
236
237
238
239
240
241
242
243
244
245
246










247
248
249
250
251
252
253
...
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
Tcl object commands (for nodes, fragment/new nodes, the document object itself)
and the underlying DOM tree.
.TP
\&\fB\fBgetDefaultOutputMethod\fP
\&\fRReturns the default output method of the document. This is
usually a result of a XSLT transformation.
.TP
\&\fB\fBasXML\fP \fB?-indent none/1..8?\fP \fB?-channel channelId?\fP \fB?-escapeNonASCII?\fP \fB?-doctypeDeclaration <boolean>?\fP \fB-xmlDeclaration <boolean>?\fP \fB-encString <string>\fP \fB?-escapeAllQuot?\fP \fB?-indentAttrs?\fP \fB?-nogtescape?\fP \fB?-noEmptyElementTag?\fP
\&\fR
.RS
.PP
Returns the DOM tree as an (optional indented) XML
string or sends the output directly to the given
channelId.










.PP
If the option \fI-escapeNonASCII\fR is given,
every non 7 bit ASCII character in attribute values or element
PCDATA content will be escaped as character reference in
decimal representation.
.PP
The flag \fI-doctypeDeclaration\fR determines whether
................................................................................
\&\fIxpathQuery\fR to the document. The context node of the query is the root
node in the sense of the XPath recommendation (not the document element). The
result can be a string/value, a list of strings, a list of nodes or a list
of attribute name / value pairs. If \fItypeVar\fR is given
the result type name is stored into that variable (empty,
bool, number, string, nodes, attrnodes or mixed).
.PP
The argument \fIxpathQuery\fR has to be a valid XPath
expression. However, there is one exception to that rule. Tcl variable
names can appear in the XPath statement at any position where it is
legal according to the rules of the XPath syntax to put an XPath
variable. The value of the variable is substituted for the variable
name. Ignoring the syntax rules of XPath the Tcl variable name may be
any legal Tcl var name: local variables, global variables, array
entries and so on.  The value will always be seen as string literal by
the xpath engine. Cast the value explicitly with the according xpath
functions (number(), boolean()) to another data type, if needed.
.PP
The option \fI-namespaces\fR expects a tcl list with prefix /
namespace pairs as argument. If this option is not given, then any
namespace prefix within the xpath expression will be first resolved
against the list of prefix / namespace pairs set with the
selectNodesNamespaces method for the document the node belongs to. If
this fails, then the namespace definitions in scope of the context
node will be used to resolve the prefix. If this option is given, any
namespace prefix within the xpath expression will be first resolved
against that given list (and ignoring the document global prefix /
namespace list). If the list binds the same prefix to different
namespaces, then the first binding will win.  If this fails, then the
namespace definitions in scope of the context node will be used to
resolve the prefix, as usual.
.PP
If the \fI-cache\fR option is used with a true value, then the
\&\fIxpathQuery\fR will be looked up in a document specific cache. If
the query is found, then the stored pre-compiled query will be used.
If the query isn't found, it will be compiled and stored in the cache,
for use in further calls. Please notice, that the \fIxpathQuery\fR as
given as string is used as key for the cache. This means that equal
XPath expressions, which differ only in white space, are treated as
different cache entries. Special care is needed if the XPath
expression includes namespace prefixes or references to tcl variables.
Both namespace prefixes and tcl variable references will be resolved
according to the XML prefix namespace mappings and tcl variable values
at expression compilation time. If the same XPath expression is used
later on in a context with other XML prefix namespace mappings or
values of the used tcl variables, make sure to first remove the
compiled expression from the cache with the help of the
\&\fBdeleteXPathCache\fP method, to force a recompilation.
Without using the \fI-cache\fR option such consideration is never
needed.
.PP
Examples:

          
.CS
set paragraphNodes [$node selectNodes {chapter[3]//para[@type='warning' or @type='error'} ]
foreach paragraph $paragraphNodes {
    lappend  values [$paragraph selectNodes attribute::type]
}

set doc [dom parse {<doc xmlns="http://www.defaultnamespace.org"><child/></doc>}]
set root [$doc documentElement]
set childNodes [$root selectNodes -namespaces {default http://www.defaultnamespace.org} default:child]
.CE
.RE
.TP
\&\fB\fBbaseURI\fP \fI?URI?\fB
\&\fRReturns the present baseURI of the document. If the optional
argument URI is given, sets the base URI of the document to the given URI.
.TP
\&\fB\fBappendFromScript\fP \fItclScript\fB







|






>
>
>
>
>
>
>
>
>
>







 







|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
...
625
626
627
628
629
630
631
632
633
634
635
636
637



















































638
639
640
641
642
643
644
Tcl object commands (for nodes, fragment/new nodes, the document object itself)
and the underlying DOM tree.
.TP
\&\fB\fBgetDefaultOutputMethod\fP
\&\fRReturns the default output method of the document. This is
usually a result of a XSLT transformation.
.TP
\&\fB\fBasXML\fP \fB?-indent none/tabs/1..8?\fP \fB?-channel channelId?\fP \fB?-escapeNonASCII?\fP \fB?-doctypeDeclaration <boolean>?\fP \fB-xmlDeclaration <boolean>?\fP \fB-encString <string>\fP \fB?-escapeAllQuot?\fP \fB?-indentAttrs?\fP \fB?-nogtescape?\fP \fB?-noEmptyElementTag?\fP
\&\fR
.RS
.PP
Returns the DOM tree as an (optional indented) XML
string or sends the output directly to the given
channelId.
.PP
The -indent option requires "no", "none", "tabs" or a
natural number betwenn 0 and 8, both included, as value. With
the values "no" or "none" no additional white space outside of
markup will be added to the serialization. I. Otherwise, it's
a "pretty-print" serialization, due to inserting white space
between end and the next start tag according to the nesting
level. The level indentation wide is given with the number. If
the value is "tabs", then indentation is done with tabs, one
tab per level.
.PP
If the option \fI-escapeNonASCII\fR is given,
every non 7 bit ASCII character in attribute values or element
PCDATA content will be escaped as character reference in
decimal representation.
.PP
The flag \fI-doctypeDeclaration\fR determines whether
................................................................................
\&\fIxpathQuery\fR to the document. The context node of the query is the root
node in the sense of the XPath recommendation (not the document element). The
result can be a string/value, a list of strings, a list of nodes or a list
of attribute name / value pairs. If \fItypeVar\fR is given
the result type name is stored into that variable (empty,
bool, number, string, nodes, attrnodes or mixed).
.PP
See the documentation of the of the
.TP
\&\fBdomNode
\&\fR command method
\&\fBselectNodes\fP for a detailed description of
the arguments.



















































.RE
.TP
\&\fB\fBbaseURI\fP \fI?URI?\fB
\&\fRReturns the present baseURI of the document. If the optional
argument URI is given, sets the base URI of the document to the given URI.
.TP
\&\fB\fBappendFromScript\fP \fItclScript\fB

Changes to doc/domDoc.xml.

112
113
114
115
116
117
118










119
120
121
122
123
124
125
...
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553

      <commanddef>
        <command><method>asXML</method> <option>?-indent none/tabs/1..8?</option> <option>?-channel channelId?</option> <option>?-escapeNonASCII?</option> <option>?-doctypeDeclaration &lt;boolean&gt;?</option> <option>-xmlDeclaration &lt;boolean&gt;?</option> <option>-encString &lt;string&gt;</option> <option>?-escapeAllQuot?</option> <option>?-indentAttrs?</option> <option>?-nogtescape?</option> <option>?-noEmptyElementTag?</option></command>
        <desc><p>Returns the DOM tree as an (optional indented) XML
        string or sends the output directly to the given
        channelId.</p>











        <p>If the option <m>-escapeNonASCII</m> is given,
        every non 7 bit ASCII character in attribute values or element
        PCDATA content will be escaped as character reference in
        decimal representation.</p>

        <p>The flag <m>-doctypeDeclaration</m> determines whether
        there will be a DOCTYPE declaration emitted before the first
................................................................................
result can be a string/value, a list of strings, a list of nodes or a list
of attribute name / value pairs. If <m>typeVar</m> is given
the result type name is stored into that variable (empty,
bool, number, string, nodes, attrnodes or mixed).</p>

          <p>See the documentation of the of the
          <command>domNode</command> command method
          <method>>selectNodes</method> for a detailed description of
          the arguments.</p>
          </desc>
      </commanddef>

      <commanddef>
        <command><method>baseURI</method> <m>?URI?</m></command>
        <desc>Returns the present baseURI of the document. If the optional 







>
>
>
>
>
>
>
>
>
>







 







|







112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563

      <commanddef>
        <command><method>asXML</method> <option>?-indent none/tabs/1..8?</option> <option>?-channel channelId?</option> <option>?-escapeNonASCII?</option> <option>?-doctypeDeclaration &lt;boolean&gt;?</option> <option>-xmlDeclaration &lt;boolean&gt;?</option> <option>-encString &lt;string&gt;</option> <option>?-escapeAllQuot?</option> <option>?-indentAttrs?</option> <option>?-nogtescape?</option> <option>?-noEmptyElementTag?</option></command>
        <desc><p>Returns the DOM tree as an (optional indented) XML
        string or sends the output directly to the given
        channelId.</p>

        <p>The -indent option requires "no", "none", "tabs" or a
        natural number betwenn 0 and 8, both included, as value. With
        the values "no" or "none" no additional white space outside of
        markup will be added to the serialization. I. Otherwise, it's
        a "pretty-print" serialization, due to inserting white space
        between end and the next start tag according to the nesting
        level. The level indentation wide is given with the number. If
        the value is "tabs", then indentation is done with tabs, one
        tab per level.</p>
        
        <p>If the option <m>-escapeNonASCII</m> is given,
        every non 7 bit ASCII character in attribute values or element
        PCDATA content will be escaped as character reference in
        decimal representation.</p>

        <p>The flag <m>-doctypeDeclaration</m> determines whether
        there will be a DOCTYPE declaration emitted before the first
................................................................................
result can be a string/value, a list of strings, a list of nodes or a list
of attribute name / value pairs. If <m>typeVar</m> is given
the result type name is stored into that variable (empty,
bool, number, string, nodes, attrnodes or mixed).</p>

          <p>See the documentation of the of the
          <command>domNode</command> command method
          <method>selectNodes</method> for a detailed description of
          the arguments.</p>
          </desc>
      </commanddef>

      <commanddef>
        <command><method>baseURI</method> <m>?URI?</m></command>
        <desc>Returns the present baseURI of the document. If the optional 

Changes to doc/domNode.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
...
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domNode</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x561e82e6b640">NAME</a> · <a href="#SECTid0x561e82d945a0">SYNOPSIS</a> · <a href="#SECTid0x561e82e49c80"> DESCRIPTION </a> · <a href="#SECTid0x561e82ebbf40">SEE ALSO</a> · <a href="#SECTid0x561e82ebc2d0">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x561e82e6b640">NAME</a></h2><p class="namesection">
<b class="names">domNode - </b><br>Manipulates an instance of a DOM node object</p>



  <h2><a name="SECTid0x561e82d945a0">SYNOPSIS</a></h2><pre class="syntax">$nodeObject <i class="m">method</i> <i class="m">arg arg ...</i>
</pre><pre class="syntax">domNode <i class="m">nodeToken</i> <i class="m">method</i> <i class="m">arg arg ...</i>
</pre>
  <h2><a name="SECTid0x561e82e49c80"> DESCRIPTION </a></h2><p>This command manipulates one particular instance of a DOM node object.
<i class="m">method</i> indicates a specific method of the node class. These methods
should closely conform to the W3C recommendation "Document Object Model
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>)
as well to parts of the W3C draft "XML Pointer Language (XPointer)"
(<a href="http://www.w3.org/TR/1998/WD-xptr-19980303">http://www.w3.org/TR/1998/WD-xptr-19980303</a>).
Please note, that the XPointer methods are deprecated. Use DOM methods
or XPath expressions instead of them.</p><p>The selectNodes method implements the "XML Path
................................................................................
you must specify the attribute name with prefix, even if you want to set an
already existing attribute to a new value. While searching, if the attribute
already exists, only the given <i class="m">uri</i> and the localname of the
<i class="m">qualifiedName</i> is used.</p>

        <pre class="example">$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue</pre>

<p>If the uri is the empty string and the attribute name doesn't have
a prefix, this method has the same effect as the method
<b>setAttribute</b>.</p>

        <pre class="example">$node setAttributeNS "" attri "some Value"</pre>

<p>With the exceptions of the special prefixes "xmlns" and "xml" you
always must provide a non empty <i class="m">uri</i> if your <i class="m">qualifiedName</i> has a
prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.</p>
................................................................................
 the namespace <i class="m">uri</i>.</dd>
      

      
        <dt>
<b class="method">attributes</b> <b class="option">?attributeNamePattern?</b>
</dt>
        <dd>Returns information about the attriubtes matching the
        <i class="m">attributeNamePattern</i>. If <i class="m">attributeNamePattern</i>
        isn't given, information about all attributes are returned.
        The return value is a Tcl list, the elements just the
        attriubute name in case of non namespaced attriubtes and three
        element sublists for namespaced attributes. n case of an
        "ordinary" namespaced attribute, the sublist elements are
        {&lt;localname&gt; &lt;prefix&gt; &lt;namespace_uri&gt;}. In the special case of
        an xml namespace declaration it is {&lt;the prefix defined&gt;
        &lt;localname&gt; ""}.
        </dd>
      
................................................................................
        <dt><b class="method">asList</b></dt>
        <dd>Returns the DOM substree starting form the current node as a
nested Tcl list.</dd>
      

      
        <dt>
<b class="method">asXML</b> <b class="option">?-indent none/1..8?</b> <b class="option">?-channel channelId?</b> <b class="option">?-escapeNonASCII?</b> <b class="option">-xmlDeclaration &lt;boolean&gt;?</b> <b class="option">-encString &lt;string&gt;</b> <b class="option">?-escapeAllQuot?</b> <b class="option">?-indentAttrs?</b> <b class="option">?-nogtescape?</b> <b class="option">?-noEmptyElementTag?</b>
</dt>
        <dd>
<p>Returns the DOM substree starting from the current
        node as the root node of the result as an (optional indented)
        XML string or sends the output directly to the given
        channelId.</p>

        <p>If the option <i class="m">-escapeNonASCII</i> is given,
        every non 7 bit ASCII character in attribute values or element
        PCDATA content will be escaped as character reference in
        decimal representation.</p>

        <p>The flag <i class="m">-xmlDeclaration</i> determines whether there
        will be an XML Declaration and a newline emitted before
        anything else. The default is, to do not. If this flag is
        given with a true argument then</p>

        <p>
<i class="m">-encString</i> sets the encoding value in the XML
        Declaration. Otherwise, this option is ignored. Please note,
        that this option just enhance the string representation of the
        generated XML Declaration with an encoding information string,
        nothing more. It's up to the user to handle encoding in case
        of writing to a channel or reparsing.</p>
            
        <p>If the option <i class="m">-escapeAllQuot</i> is given,
        quotation marks will be escaped with &amp;quot; even in text
        content of elements.</p>

        <p>If the option <i class="m">-indentAttrs</i> is
        given, then attributes will each be separated with newlines
        and indented to the same level as the parent node plus the
        value given as argument to <i class="m">-indentAttrs</i> (0..8).</p>

        <p>If the option <i class="m">-nogtescape</i> is given then the
        character '&gt;' won't get escaped in attribute values and text
        content of elements. The default is to escape this
        character.</p>

        <p>If the option <i class="m">-noEmptyElementTag</i> is given then no
        empty tag syntax will be used. Instead, if an element has
        empty content it will be serialized with an element start tag
        and an immediately following element end tag.</p>
</dd>

      

      
        <dt>
<b class="method">asHTML</b> <b class="option">?-channel channelId?</b>
<b class="option">?-escapeNonASCII?</b>  <b class="option">?-htmlEntities?</b>
</dt>
................................................................................
      

    </dl><p>Otherwise, if an unknown method name is given, the command with the same
name as the given method within the namespace <tt class="l">::dom::domNode</tt> is tried to
be executed. This allows quick method additions on Tcl level.</p>


  <h2><a name="SECTid0x561e82ebbf40">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
  
  <h2><a name="SECTid0x561e82ebc2d0">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
</p>
  
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>






|


|




|


|







 







|
|







 







|



|







 







|







|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<







 







|

|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
...
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516

































517

518
519
520
521
522
523
524
...
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domNode</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x55a2288bc630">NAME</a> · <a href="#SECTid0x55a2287f2bb0">SYNOPSIS</a> · <a href="#SECTid0x55a22889ac90"> DESCRIPTION </a> · <a href="#SECTid0x55a22890bf10">SEE ALSO</a> · <a href="#SECTid0x55a22890c2a0">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x55a2288bc630">NAME</a></h2><p class="namesection">
<b class="names">domNode - </b><br>Manipulates an instance of a DOM node object</p>



  <h2><a name="SECTid0x55a2287f2bb0">SYNOPSIS</a></h2><pre class="syntax">$nodeObject <i class="m">method</i> <i class="m">arg arg ...</i>
</pre><pre class="syntax">domNode <i class="m">nodeToken</i> <i class="m">method</i> <i class="m">arg arg ...</i>
</pre>
  <h2><a name="SECTid0x55a22889ac90"> DESCRIPTION </a></h2><p>This command manipulates one particular instance of a DOM node object.
<i class="m">method</i> indicates a specific method of the node class. These methods
should closely conform to the W3C recommendation "Document Object Model
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>)
as well to parts of the W3C draft "XML Pointer Language (XPointer)"
(<a href="http://www.w3.org/TR/1998/WD-xptr-19980303">http://www.w3.org/TR/1998/WD-xptr-19980303</a>).
Please note, that the XPointer methods are deprecated. Use DOM methods
or XPath expressions instead of them.</p><p>The selectNodes method implements the "XML Path
................................................................................
you must specify the attribute name with prefix, even if you want to set an
already existing attribute to a new value. While searching, if the attribute
already exists, only the given <i class="m">uri</i> and the localname of the
<i class="m">qualifiedName</i> is used.</p>

        <pre class="example">$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue</pre>

<p>If the uri is the empty string and the attribute name has no
prefix, this method has the same effect as the method
<b>setAttribute</b>.</p>

        <pre class="example">$node setAttributeNS "" attri "some Value"</pre>

<p>With the exceptions of the special prefixes "xmlns" and "xml" you
always must provide a non empty <i class="m">uri</i> if your <i class="m">qualifiedName</i> has a
prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.</p>
................................................................................
 the namespace <i class="m">uri</i>.</dd>
      

      
        <dt>
<b class="method">attributes</b> <b class="option">?attributeNamePattern?</b>
</dt>
        <dd>Returns information about the attributes matching the
        <i class="m">attributeNamePattern</i>. If <i class="m">attributeNamePattern</i>
        isn't given, information about all attributes are returned.
        The return value is a Tcl list, the elements just the
        attribute name in case of non namespaced attributes and three
        element sublists for namespaced attributes. n case of an
        "ordinary" namespaced attribute, the sublist elements are
        {&lt;localname&gt; &lt;prefix&gt; &lt;namespace_uri&gt;}. In the special case of
        an xml namespace declaration it is {&lt;the prefix defined&gt;
        &lt;localname&gt; ""}.
        </dd>
      
................................................................................
        <dt><b class="method">asList</b></dt>
        <dd>Returns the DOM substree starting form the current node as a
nested Tcl list.</dd>
      

      
        <dt>
<b class="method">asXML</b> <b class="option">?-indent none/tabs/1..8?</b> <b class="option">?-channel channelId?</b> <b class="option">?-escapeNonASCII?</b> <b class="option">?-doctypeDeclaration &lt;boolean&gt;?</b> <b class="option">-xmlDeclaration &lt;boolean&gt;?</b> <b class="option">-encString &lt;string&gt;</b> <b class="option">?-escapeAllQuot?</b> <b class="option">?-indentAttrs?</b> <b class="option">?-nogtescape?</b> <b class="option">?-noEmptyElementTag?</b>
</dt>
        <dd>
<p>Returns the DOM substree starting from the current
        node as the root node of the result as an (optional indented)
        XML string or sends the output directly to the given
        channelId.</p>

        <p>See the documentation of the of the <b class="command"> domDoc
        </b> command method <b class="method">asXML</b> for a
        detailed description of the arguments.</p>

































        </dd>

      

      
        <dt>
<b class="method">asHTML</b> <b class="option">?-channel channelId?</b>
<b class="option">?-escapeNonASCII?</b>  <b class="option">?-htmlEntities?</b>
</dt>
................................................................................
      

    </dl><p>Otherwise, if an unknown method name is given, the command with the same
name as the given method within the namespace <tt class="l">::dom::domNode</tt> is tried to
be executed. This allows quick method additions on Tcl level.</p>


  <h2><a name="SECTid0x55a22890bf10">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
  
  <h2><a name="SECTid0x55a22890c2a0">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
</p>
  
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/domNode.n.

296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
...
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
...
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518

519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551

552
553
554
555
556
557
558


        
.CS
$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue
.CE
.PP
If the uri is the empty string and the attribute name doesn't have
a prefix, this method has the same effect as the method
\&\fBsetAttribute\fR.


        
.CS
$node setAttributeNS "" attri "some Value"
.CE
................................................................................
.RE
.TP
\&\fB\fBremoveAttributeNS\fP \fIuri\fB \fIlocalName\fB
\&\fRRemoves the attribute with the local name \fIlocalName\fR within
the namespace \fIuri\fR.
.TP
\&\fB\fBattributes\fP \fB?attributeNamePattern?\fP
\&\fRReturns information about the attriubtes matching the
\&\fIattributeNamePattern\fR. If \fIattributeNamePattern\fR
isn't given, information about all attributes are returned.
The return value is a Tcl list, the elements just the
attriubute name in case of non namespaced attriubtes and three
element sublists for namespaced attributes. n case of an
"ordinary" namespaced attribute, the sublist elements are
{<localname> <prefix> <namespace_uri>}. In the special case of
an xml namespace declaration it is {<the prefix defined>
<localname> ""}.
.TP
\&\fB\fBattributeNames\fP \fB?attributeNamePattern?\fP
................................................................................
\&\fRReturns the column number of that node in the originally parsed
XML.
.TP
\&\fB\fBasList\fP
\&\fRReturns the DOM substree starting form the current node as a
nested Tcl list.
.TP
\&\fB\fBasXML\fP \fB?-indent none/1..8?\fP \fB?-channel channelId?\fP \fB?-escapeNonASCII?\fP \fB-xmlDeclaration <boolean>?\fP \fB-encString <string>\fP \fB?-escapeAllQuot?\fP \fB?-indentAttrs?\fP \fB?-nogtescape?\fP \fB?-noEmptyElementTag?\fP
\&\fR
.RS
.PP
Returns the DOM substree starting from the current
node as the root node of the result as an (optional indented)
XML string or sends the output directly to the given
channelId.
.PP
If the option \fI-escapeNonASCII\fR is given,
every non 7 bit ASCII character in attribute values or element

PCDATA content will be escaped as character reference in
decimal representation.
.PP
The flag \fI-xmlDeclaration\fR determines whether there
will be an XML Declaration and a newline emitted before
anything else. The default is, to do not. If this flag is
given with a true argument then
.PP
\&\fI-encString\fR sets the encoding value in the XML
Declaration. Otherwise, this option is ignored. Please note,
that this option just enhance the string representation of the
generated XML Declaration with an encoding information string,
nothing more. It's up to the user to handle encoding in case
of writing to a channel or reparsing.
.PP
If the option \fI-escapeAllQuot\fR is given,
quotation marks will be escaped with &quot; even in text
content of elements.
.PP
If the option \fI-indentAttrs\fR is
given, then attributes will each be separated with newlines
and indented to the same level as the parent node plus the
value given as argument to \fI-indentAttrs\fR (0..8).
.PP
If the option \fI-nogtescape\fR is given then the
character '>' won't get escaped in attribute values and text
content of elements. The default is to escape this
character.
.PP
If the option \fI-noEmptyElementTag\fR is given then no
empty tag syntax will be used. Instead, if an element has
empty content it will be serialized with an element start tag
and an immediately following element end tag.

.RE
.TP
\&\fB\fBasHTML\fP \fB?-channel channelId?\fP \fB?-escapeNonASCII?\fP  \fB?-htmlEntities?\fP
\&\fRReturns the DOM substree starting from the current node as the
root node of the result serialized according to HTML rules (HTML elements are
recognized regardless of case, without end tags for empty HTML elements etc.),
as string or sends the output directly to the given channelId. If the option







|
|







 







|



|







 







|








|
<
>
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
...
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
...
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517

518
519
520































521
522
523
524
525
526
527
528


        
.CS
$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue
.CE
.PP
If the uri is the empty string and the attribute name has no
prefix, this method has the same effect as the method
\&\fBsetAttribute\fR.


        
.CS
$node setAttributeNS "" attri "some Value"
.CE
................................................................................
.RE
.TP
\&\fB\fBremoveAttributeNS\fP \fIuri\fB \fIlocalName\fB
\&\fRRemoves the attribute with the local name \fIlocalName\fR within
the namespace \fIuri\fR.
.TP
\&\fB\fBattributes\fP \fB?attributeNamePattern?\fP
\&\fRReturns information about the attributes matching the
\&\fIattributeNamePattern\fR. If \fIattributeNamePattern\fR
isn't given, information about all attributes are returned.
The return value is a Tcl list, the elements just the
attribute name in case of non namespaced attributes and three
element sublists for namespaced attributes. n case of an
"ordinary" namespaced attribute, the sublist elements are
{<localname> <prefix> <namespace_uri>}. In the special case of
an xml namespace declaration it is {<the prefix defined>
<localname> ""}.
.TP
\&\fB\fBattributeNames\fP \fB?attributeNamePattern?\fP
................................................................................
\&\fRReturns the column number of that node in the originally parsed
XML.
.TP
\&\fB\fBasList\fP
\&\fRReturns the DOM substree starting form the current node as a
nested Tcl list.
.TP
\&\fB\fBasXML\fP \fB?-indent none/tabs/1..8?\fP \fB?-channel channelId?\fP \fB?-escapeNonASCII?\fP \fB?-doctypeDeclaration <boolean>?\fP \fB-xmlDeclaration <boolean>?\fP \fB-encString <string>\fP \fB?-escapeAllQuot?\fP \fB?-indentAttrs?\fP \fB?-nogtescape?\fP \fB?-noEmptyElementTag?\fP
\&\fR
.RS
.PP
Returns the DOM substree starting from the current
node as the root node of the result as an (optional indented)
XML string or sends the output directly to the given
channelId.
.PP
See the documentation of the of the

.TP
\&\fB domDoc
\&\fR command method \fBasXML\fP for a































detailed description of the arguments.
.RE
.TP
\&\fB\fBasHTML\fP \fB?-channel channelId?\fP \fB?-escapeNonASCII?\fP  \fB?-htmlEntities?\fP
\&\fRReturns the DOM substree starting from the current node as the
root node of the result serialized according to HTML rules (HTML elements are
recognized regardless of case, without end tags for empty HTML elements etc.),
as string or sends the output directly to the given channelId. If the option

Changes to doc/domNode.xml.

445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
      <commanddef>
        <command><method>asList</method></command>
        <desc>Returns the DOM substree starting form the current node as a
nested Tcl list.</desc>
      </commanddef>

      <commanddef>
        <command><method>asXML</method> <option>?-indent none/1..8?</option> <option>?-channel channelId?</option> <option>?-escapeNonASCII?</option> <option>-xmlDeclaration &lt;boolean&gt;?</option> <option>-encString &lt;string&gt;</option> <option>?-escapeAllQuot?</option> <option>?-indentAttrs?</option> <option>?-nogtescape?</option> <option>?-noEmptyElementTag?</option></command>
        <desc><p>Returns the DOM substree starting from the current
        node as the root node of the result as an (optional indented)
        XML string or sends the output directly to the given
        channelId.</p>

        <p>If the option <m>-escapeNonASCII</m> is given,
        every non 7 bit ASCII character in attribute values or element
        PCDATA content will be escaped as character reference in
        decimal representation.</p>

        <p>The flag <m>-xmlDeclaration</m> determines whether there
        will be an XML Declaration and a newline emitted before
        anything else. The default is, to do not. If this flag is
        given with a true argument then</p>

        <p><m>-encString</m> sets the encoding value in the XML
        Declaration. Otherwise, this option is ignored. Please note,
        that this option just enhance the string representation of the
        generated XML Declaration with an encoding information string,
        nothing more. It's up to the user to handle encoding in case
        of writing to a channel or reparsing.</p>
            
        <p>If the option <m>-escapeAllQuot</m> is given,
        quotation marks will be escaped with &amp;quot; even in text
        content of elements.</p>

        <p>If the option <m>-indentAttrs</m> is
        given, then attributes will each be separated with newlines
        and indented to the same level as the parent node plus the
        value given as argument to <m>-indentAttrs</m> (0..8).</p>

        <p>If the option <m>-nogtescape</m> is given then the
        character '>' won't get escaped in attribute values and text
        content of elements. The default is to escape this
        character.</p>

        <p>If the option <m>-noEmptyElementTag</m> is given then no
        empty tag syntax will be used. Instead, if an element has
        empty content it will be serialized with an element start tag
        and an immediately following element end tag.</p></desc>

      </commanddef>

      <commanddef>
        <command><method>asHTML</method> <option>?-channel channelId?</option>
<option>?-escapeNonASCII?</option>  <option>?-htmlEntities?</option></command>
        <desc>Returns the DOM substree starting from the current node as the
root node of the result serialized according to HTML rules (HTML elements are







|





|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
































462
463
464
465
466
467
468
      <commanddef>
        <command><method>asList</method></command>
        <desc>Returns the DOM substree starting form the current node as a
nested Tcl list.</desc>
      </commanddef>

      <commanddef>
        <command><method>asXML</method> <option>?-indent none/tabs/1..8?</option> <option>?-channel channelId?</option> <option>?-escapeNonASCII?</option> <option>?-doctypeDeclaration &lt;boolean&gt;?</option> <option>-xmlDeclaration &lt;boolean&gt;?</option> <option>-encString &lt;string&gt;</option> <option>?-escapeAllQuot?</option> <option>?-indentAttrs?</option> <option>?-nogtescape?</option> <option>?-noEmptyElementTag?</option></command>
        <desc><p>Returns the DOM substree starting from the current
        node as the root node of the result as an (optional indented)
        XML string or sends the output directly to the given
        channelId.</p>

        <p>See the documentation of the of the <command> domDoc
        </command> command method <method>asXML</method> for a
        detailed description of the arguments.</p>
        </desc>
































      </commanddef>

      <commanddef>
        <command><method>asHTML</method> <option>?-channel channelId?</option>
<option>?-escapeNonASCII?</option>  <option>?-htmlEntities?</option></command>
        <desc>Returns the DOM substree starting from the current node as the
root node of the result serialized according to HTML rules (HTML elements are