Artifact 6332872254ffbc696d2b385938cff866b8f3760518005a7a27aba5dce32bb84f:

  • File doc/domNode.html — part of check-in [7ec866b33f] at 2019-08-16 13:04:51 on branch trunk — Corrected speeling and better wording. (user: rolf size: 31716) [more...]

0000: 3c 68 74 6d 6c 3e 0a 3c 68 65 61 64 3e 0a 3c 6c  <html>.<head>.<l
0010: 69 6e 6b 20 72 65 6c 3d 22 73 74 79 6c 65 73 68  ink rel="stylesh
0020: 65 65 74 22 20 68 72 65 66 3d 22 6d 61 6e 70 61  eet" href="manpa
0030: 67 65 2e 63 73 73 22 3e 3c 74 69 74 6c 65 3e 74  ge.css"><title>t
0040: 44 4f 4d 20 6d 61 6e 75 61 6c 3a 20 64 6f 6d 4e  DOM manual: domN
0050: 6f 64 65 3c 2f 74 69 74 6c 65 3e 3c 6d 65 74 61  ode</title><meta
0060: 20 6e 61 6d 65 3d 22 78 73 6c 2d 70 72 6f 63 65   name="xsl-proce
0070: 73 73 6f 72 22 20 63 6f 6e 74 65 6e 74 3d 22 4a  ssor" content="J
0080: 6f 63 68 65 6e 20 4c 6f 65 77 65 72 20 28 6c 6f  ochen Loewer (lo
0090: 65 77 65 72 6a 40 68 6f 74 6d 61 69 6c 2e 63 6f  ewerj@hotmail.co
00a0: 6d 29 2c 20 52 6f 6c 66 20 41 64 65 20 28 72 6f  m), Rolf Ade (ro
00b0: 6c 66 40 70 6f 69 6e 74 73 6d 61 6e 2e 64 65 29  lf@pointsman.de)
00c0: 20 65 74 2e 20 61 6c 2e 22 3e 3c 6d 65 74 61 20   et. al."><meta 
00d0: 6e 61 6d 65 3d 22 67 65 6e 65 72 61 74 6f 72 22  name="generator"
00e0: 20 63 6f 6e 74 65 6e 74 3d 22 24 52 43 53 66 69   content="$RCSfi
00f0: 6c 65 3a 20 74 6d 6d 6c 2d 68 74 6d 6c 2e 78 73  le: tmml-html.xs
0100: 6c 2c 76 20 24 20 24 52 65 76 69 73 69 6f 6e 3a  l,v $ $Revision:
0110: 20 31 2e 31 31 20 24 22 3e 3c 6d 65 74 61 20 63   1.11 $"><meta c
0120: 68 61 72 73 65 74 3d 22 75 74 66 2d 38 22 3e 0a  harset="utf-8">.
0130: 3c 2f 68 65 61 64 3e 3c 62 6f 64 79 3e 0a 3c 64  </head><body>.<d
0140: 69 76 20 63 6c 61 73 73 3d 22 68 65 61 64 65 72  iv class="header
0150: 22 3e 0a 3c 64 69 76 20 63 6c 61 73 73 3d 22 6e  ">.<div class="n
0160: 61 76 62 61 72 22 20 61 6c 69 67 6e 3d 22 63 65  avbar" align="ce
0170: 6e 74 65 72 22 3e 0a 3c 61 20 68 72 65 66 3d 22  nter">.<a href="
0180: 23 53 45 43 54 69 64 30 78 35 36 31 65 38 32 65  #SECTid0x561e82e
0190: 36 62 36 34 30 22 3e 4e 41 4d 45 3c 2f 61 3e 20  6b640">NAME</a> 
01a0: c2 b7 20 3c 61 20 68 72 65 66 3d 22 23 53 45 43  · <a href="#SEC
01b0: 54 69 64 30 78 35 36 31 65 38 32 64 39 34 35 61  Tid0x561e82d945a
01c0: 30 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 20  0">SYNOPSIS</a> 
01d0: c2 b7 20 3c 61 20 68 72 65 66 3d 22 23 53 45 43  · <a href="#SEC
01e0: 54 69 64 30 78 35 36 31 65 38 32 65 34 39 63 38  Tid0x561e82e49c8
01f0: 30 22 3e 20 44 45 53 43 52 49 50 54 49 4f 4e 20  0"> DESCRIPTION 
0200: 3c 2f 61 3e 20 c2 b7 20 3c 61 20 68 72 65 66 3d  </a> · <a href=
0210: 22 23 53 45 43 54 69 64 30 78 35 36 31 65 38 32  "#SECTid0x561e82
0220: 65 62 62 66 34 30 22 3e 53 45 45 20 41 4c 53 4f  ebbf40">SEE ALSO
0230: 3c 2f 61 3e 20 c2 b7 20 3c 61 20 68 72 65 66 3d  </a> · <a href=
0240: 22 23 53 45 43 54 69 64 30 78 35 36 31 65 38 32  "#SECTid0x561e82
0250: 65 62 63 32 64 30 22 3e 4b 45 59 57 4f 52 44 53  ebc2d0">KEYWORDS
0260: 3c 2f 61 3e 0a 3c 2f 64 69 76 3e 3c 68 72 20 63  </a>.</div><hr c
0270: 6c 61 73 73 3d 22 6e 61 76 73 65 70 22 3e 0a 3c  lass="navsep">.<
0280: 2f 64 69 76 3e 3c 64 69 76 20 63 6c 61 73 73 3d  /div><div class=
0290: 22 62 6f 64 79 22 3e 0a 20 20 3c 68 32 3e 3c 61  "body">.  <h2><a
02a0: 20 6e 61 6d 65 3d 22 53 45 43 54 69 64 30 78 35   name="SECTid0x5
02b0: 36 31 65 38 32 65 36 62 36 34 30 22 3e 4e 41 4d  61e82e6b640">NAM
02c0: 45 3c 2f 61 3e 3c 2f 68 32 3e 3c 70 20 63 6c 61  E</a></h2><p cla
02d0: 73 73 3d 22 6e 61 6d 65 73 65 63 74 69 6f 6e 22  ss="namesection"
02e0: 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6e 61 6d 65  >.<b class="name
02f0: 73 22 3e 64 6f 6d 4e 6f 64 65 20 2d 20 3c 2f 62  s">domNode - </b
0300: 3e 3c 62 72 3e 4d 61 6e 69 70 75 6c 61 74 65 73  ><br>Manipulates
0310: 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20   an instance of 
0320: 61 20 44 4f 4d 20 6e 6f 64 65 20 6f 62 6a 65 63  a DOM node objec
0330: 74 3c 2f 70 3e 0a 0a 0a 0a 20 20 3c 68 32 3e 3c  t</p>....  <h2><
0340: 61 20 6e 61 6d 65 3d 22 53 45 43 54 69 64 30 78  a name="SECTid0x
0350: 35 36 31 65 38 32 64 39 34 35 61 30 22 3e 53 59  561e82d945a0">SY
0360: 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 32 3e 3c  NOPSIS</a></h2><
0370: 70 72 65 20 63 6c 61 73 73 3d 22 73 79 6e 74 61  pre class="synta
0380: 78 22 3e 24 6e 6f 64 65 4f 62 6a 65 63 74 20 3c  x">$nodeObject <
0390: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6d 65 74 68  i class="m">meth
03a0: 6f 64 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d  od</i> <i class=
03b0: 22 6d 22 3e 61 72 67 20 61 72 67 20 2e 2e 2e 3c  "m">arg arg ...<
03c0: 2f 69 3e 0a 3c 2f 70 72 65 3e 3c 70 72 65 20 63  /i>.</pre><pre c
03d0: 6c 61 73 73 3d 22 73 79 6e 74 61 78 22 3e 64 6f  lass="syntax">do
03e0: 6d 4e 6f 64 65 20 3c 69 20 63 6c 61 73 73 3d 22  mNode <i class="
03f0: 6d 22 3e 6e 6f 64 65 54 6f 6b 65 6e 3c 2f 69 3e  m">nodeToken</i>
0400: 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6d 65   <i class="m">me
0410: 74 68 6f 64 3c 2f 69 3e 20 3c 69 20 63 6c 61 73  thod</i> <i clas
0420: 73 3d 22 6d 22 3e 61 72 67 20 61 72 67 20 2e 2e  s="m">arg arg ..
0430: 2e 3c 2f 69 3e 0a 3c 2f 70 72 65 3e 0a 20 20 3c  .</i>.</pre>.  <
0440: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 43 54  h2><a name="SECT
0450: 69 64 30 78 35 36 31 65 38 32 65 34 39 63 38 30  id0x561e82e49c80
0460: 22 3e 20 44 45 53 43 52 49 50 54 49 4f 4e 20 3c  "> DESCRIPTION <
0470: 2f 61 3e 3c 2f 68 32 3e 3c 70 3e 54 68 69 73 20  /a></h2><p>This 
0480: 63 6f 6d 6d 61 6e 64 20 6d 61 6e 69 70 75 6c 61  command manipula
0490: 74 65 73 20 6f 6e 65 20 70 61 72 74 69 63 75 6c  tes one particul
04a0: 61 72 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 61  ar instance of a
04b0: 20 44 4f 4d 20 6e 6f 64 65 20 6f 62 6a 65 63 74   DOM node object
04c0: 2e 0a 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6d  ..<i class="m">m
04d0: 65 74 68 6f 64 3c 2f 69 3e 20 69 6e 64 69 63 61  ethod</i> indica
04e0: 74 65 73 20 61 20 73 70 65 63 69 66 69 63 20 6d  tes a specific m
04f0: 65 74 68 6f 64 20 6f 66 20 74 68 65 20 6e 6f 64  ethod of the nod
0500: 65 20 63 6c 61 73 73 2e 20 54 68 65 73 65 20 6d  e class. These m
0510: 65 74 68 6f 64 73 0a 73 68 6f 75 6c 64 20 63 6c  ethods.should cl
0520: 6f 73 65 6c 79 20 63 6f 6e 66 6f 72 6d 20 74 6f  osely conform to
0530: 20 74 68 65 20 57 33 43 20 72 65 63 6f 6d 6d 65   the W3C recomme
0540: 6e 64 61 74 69 6f 6e 20 22 44 6f 63 75 6d 65 6e  ndation "Documen
0550: 74 20 4f 62 6a 65 63 74 20 4d 6f 64 65 6c 0a 28  t Object Model.(
0560: 43 6f 72 65 29 20 4c 65 76 65 6c 20 31 22 20 28  Core) Level 1" (
0570: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a href="http://
0580: 77 77 77 2e 77 33 2e 6f 72 67 2f 54 52 2f 52 45  www.w3.org/TR/RE
0590: 43 2d 44 4f 4d 2d 4c 65 76 65 6c 2d 31 2f 6c 65  C-DOM-Level-1/le
05a0: 76 65 6c 2d 6f 6e 65 2d 63 6f 72 65 2e 68 74 6d  vel-one-core.htm
05b0: 6c 22 3e 68 74 74 70 3a 2f 2f 77 77 77 2e 77 33  l">http://www.w3
05c0: 2e 6f 72 67 2f 54 52 2f 52 45 43 2d 44 4f 4d 2d  .org/TR/REC-DOM-
05d0: 4c 65 76 65 6c 2d 31 2f 6c 65 76 65 6c 2d 6f 6e  Level-1/level-on
05e0: 65 2d 63 6f 72 65 2e 68 74 6d 6c 3c 2f 61 3e 29  e-core.html</a>)
05f0: 0a 61 73 20 77 65 6c 6c 20 74 6f 20 70 61 72 74  .as well to part
0600: 73 20 6f 66 20 74 68 65 20 57 33 43 20 64 72 61  s of the W3C dra
0610: 66 74 20 22 58 4d 4c 20 50 6f 69 6e 74 65 72 20  ft "XML Pointer 
0620: 4c 61 6e 67 75 61 67 65 20 28 58 50 6f 69 6e 74  Language (XPoint
0630: 65 72 29 22 0a 28 3c 61 20 68 72 65 66 3d 22 68  er)".(<a href="h
0640: 74 74 70 3a 2f 2f 77 77 77 2e 77 33 2e 6f 72 67  ttp://www.w3.org
0650: 2f 54 52 2f 31 39 39 38 2f 57 44 2d 78 70 74 72  /TR/1998/WD-xptr
0660: 2d 31 39 39 38 30 33 30 33 22 3e 68 74 74 70 3a  -19980303">http:
0670: 2f 2f 77 77 77 2e 77 33 2e 6f 72 67 2f 54 52 2f  //www.w3.org/TR/
0680: 31 39 39 38 2f 57 44 2d 78 70 74 72 2d 31 39 39  1998/WD-xptr-199
0690: 38 30 33 30 33 3c 2f 61 3e 29 2e 0a 50 6c 65 61  80303</a>)..Plea
06a0: 73 65 20 6e 6f 74 65 2c 20 74 68 61 74 20 74 68  se note, that th
06b0: 65 20 58 50 6f 69 6e 74 65 72 20 6d 65 74 68 6f  e XPointer metho
06c0: 64 73 20 61 72 65 20 64 65 70 72 65 63 61 74 65  ds are deprecate
06d0: 64 2e 20 55 73 65 20 44 4f 4d 20 6d 65 74 68 6f  d. Use DOM metho
06e0: 64 73 0a 6f 72 20 58 50 61 74 68 20 65 78 70 72  ds.or XPath expr
06f0: 65 73 73 69 6f 6e 73 20 69 6e 73 74 65 61 64 20  essions instead 
0700: 6f 66 20 74 68 65 6d 2e 3c 2f 70 3e 3c 70 3e 54  of them.</p><p>T
0710: 68 65 20 73 65 6c 65 63 74 4e 6f 64 65 73 20 6d  he selectNodes m
0720: 65 74 68 6f 64 20 69 6d 70 6c 65 6d 65 6e 74 73  ethod implements
0730: 20 74 68 65 20 22 58 4d 4c 20 50 61 74 68 0a 4c   the "XML Path.L
0740: 61 6e 67 75 61 67 65 20 28 58 50 61 74 68 29 20  anguage (XPath) 
0750: 56 65 72 73 69 6f 6e 20 31 2e 30 22 20 57 33 43  Version 1.0" W3C
0760: 20 72 65 63 6f 6d 6d 65 6e 64 61 74 69 6f 6e 20   recommendation 
0770: 31 36 20 4e 6f 76 65 6d 62 65 72 20 31 39 39 39  16 November 1999
0780: 20 28 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a   (<a href="http:
0790: 2f 2f 77 77 77 2e 77 33 2e 6f 72 67 2f 54 52 2f  //www.w3.org/TR/
07a0: 31 39 39 39 2f 52 45 43 2d 78 70 61 74 68 2d 31  1999/REC-xpath-1
07b0: 39 39 39 31 31 31 36 22 3e 68 74 74 70 3a 2f 2f  9991116">http://
07c0: 77 77 77 2e 77 33 2e 6f 72 67 2f 54 52 2f 31 39  www.w3.org/TR/19
07d0: 39 39 2f 52 45 43 2d 78 70 61 74 68 2d 31 39 39  99/REC-xpath-199
07e0: 39 31 31 31 36 3c 2f 61 3e 29 2e 20 4c 6f 6f 6b  91116</a>). Look
07f0: 0a 61 74 20 74 68 65 73 65 20 64 6f 63 75 6d 65  .at these docume
0800: 6e 74 73 20 66 6f 72 20 61 20 64 65 65 70 65 72  nts for a deeper
0810: 20 75 6e 64 65 72 73 74 61 6e 64 69 6e 67 20 6f   understanding o
0820: 66 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 61 6c  f the functional
0830: 69 74 79 2e 3c 2f 70 3e 3c 70 3e 54 68 65 20 76  ity.</p><p>The v
0840: 61 6c 69 64 20 6d 65 74 68 6f 64 73 20 61 72 65  alid methods are
0850: 3a 3c 2f 70 3e 3c 64 6c 20 63 6c 61 73 73 3d 22  :</p><dl class="
0860: 63 6f 6d 6d 61 6e 64 6c 69 73 74 22 3e 0a 20 20  commandlist">.  
0870: 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74      .        <dt
0880: 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f  ><b class="metho
0890: 64 22 3e 6e 6f 64 65 54 79 70 65 3c 2f 62 3e 3c  d">nodeType</b><
08a0: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
08b0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 6e 6f 64  >Returns the nod
08c0: 65 20 74 79 70 65 20 6f 66 20 74 68 61 74 20 6e  e type of that n
08d0: 6f 64 65 20 6f 62 6a 65 63 74 2e 20 54 68 69 73  ode object. This
08e0: 20 63 61 6e 20 62 65 3a 0a 45 4c 45 4d 45 4e 54   can be:.ELEMENT
08f0: 5f 4e 4f 44 45 2c 20 54 45 58 54 5f 4e 4f 44 45  _NODE, TEXT_NODE
0900: 2c 20 43 44 41 54 41 5f 53 45 43 54 49 4f 4e 5f  , CDATA_SECTION_
0910: 4e 4f 44 45 2c 20 43 4f 4d 4d 45 4e 54 5f 4e 4f  NODE, COMMENT_NO
0920: 44 45 20 6f 72 0a 50 52 4f 43 45 53 53 49 4e 47  DE or.PROCESSING
0930: 5f 49 4e 53 54 52 55 43 54 49 4f 4e 5f 4e 4f 44  _INSTRUCTION_NOD
0940: 45 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  E.</dd>.      ..
0950: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
0960: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  dt><b class="met
0970: 68 6f 64 22 3e 6e 6f 64 65 4e 61 6d 65 3c 2f 62  hod">nodeName</b
0980: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
0990: 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 6e  dd>Returns the n
09a0: 6f 64 65 20 6e 61 6d 65 20 6f 66 20 74 68 61 74  ode name of that
09b0: 20 6e 6f 64 65 20 6f 62 6a 65 63 74 2e 20 54 68   node object. Th
09c0: 69 73 20 69 73 20 74 68 65 20 65 6c 65 6d 65 6e  is is the elemen
09d0: 74 0a 28 74 61 67 29 20 6e 61 6d 65 20 66 6f 72  t.(tag) name for
09e0: 20 65 6c 65 6d 65 6e 74 20 6e 6f 64 65 73 20 28   element nodes (
09f0: 74 79 70 65 20 45 4c 45 4d 45 4e 54 5f 4e 4f 44  type ELEMENT_NOD
0a00: 45 29 2c 20 74 68 65 20 70 72 6f 63 65 73 73 69  E), the processi
0a10: 6e 67 2d 69 6e 73 74 72 75 63 74 69 6f 6e 0a 74  ng-instruction.t
0a20: 61 72 67 65 74 20 66 6f 72 20 70 72 6f 63 65 73  arget for proces
0a30: 73 69 6e 67 2d 69 6e 73 74 72 75 63 74 69 6f 6e  sing-instruction
0a40: 73 2c 20 22 23 74 65 78 74 22 20 66 6f 72 20 74  s, "#text" for t
0a50: 65 78 74 20 6e 6f 64 65 2c 0a 22 23 63 6f 6d 6d  ext node,."#comm
0a60: 65 6e 74 22 20 66 6f 72 20 63 6f 6d 6d 65 6e 74  ent" for comment
0a70: 20 6e 6f 64 65 73 20 6f 72 20 22 23 63 64 61 74   nodes or "#cdat
0a80: 61 22 20 66 6f 72 20 63 64 61 74 61 20 73 65 63  a" for cdata sec
0a90: 74 69 6f 6e 0a 6e 6f 64 65 73 2e 3c 2f 64 64 3e  tion.nodes.</dd>
0aa0: 0a 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a  .      ..      .
0ab0: 20 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62 20          <dt>.<b 
0ac0: 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 6e  class="method">n
0ad0: 6f 64 65 56 61 6c 75 65 3c 2f 62 3e 20 3c 69 20  odeValue</b> <i 
0ae0: 63 6c 61 73 73 3d 22 6d 22 3e 3f 6e 65 77 56 61  class="m">?newVa
0af0: 6c 75 65 3f 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a 20  lue?</i>.</dt>. 
0b00: 20 20 20 20 20 20 20 3c 64 64 3e 52 65 74 75 72         <dd>Retur
0b10: 6e 73 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20  ns the value of 
0b20: 74 68 61 74 20 6e 6f 64 65 20 6f 62 6a 65 63 74  that node object
0b30: 2e 20 54 68 69 73 20 69 73 20 74 68 65 20 74 65  . This is the te
0b40: 78 74 20 6f 72 0a 74 68 65 20 64 61 74 61 20 66  xt or.the data f
0b50: 6f 72 20 65 6c 65 6d 65 6e 74 20 6e 6f 64 65 73  or element nodes
0b60: 20 6f 66 20 74 79 70 65 20 54 45 58 54 5f 4e 4f   of type TEXT_NO
0b70: 44 45 2c 20 43 4f 4d 4d 45 4e 54 5f 4e 4f 44 45  DE, COMMENT_NODE
0b80: 2c 0a 50 52 4f 43 45 53 53 49 4e 47 5f 49 4e 53  ,.PROCESSING_INS
0b90: 54 52 55 43 54 49 4f 4e 5f 4e 4f 44 45 20 6f 72  TRUCTION_NODE or
0ba0: 20 43 44 41 54 41 5f 53 45 43 54 49 4f 4e 5f 4e   CDATA_SECTION_N
0bb0: 4f 44 45 29 2e 20 4f 74 68 65 72 77 69 73 65 20  ODE). Otherwise 
0bc0: 69 74 20 69 73 20 65 6d 70 74 79 2e 20 49 66 0a  it is empty. If.
0bd0: 74 68 65 20 6e 6f 64 65 20 69 73 20 61 20 54 45  the node is a TE
0be0: 58 54 5f 4e 4f 44 45 2c 20 43 4f 4d 4d 45 4e 54  XT_NODE, COMMENT
0bf0: 5f 4e 4f 44 45 20 6f 72 20 50 52 4f 43 45 53 53  _NODE or PROCESS
0c00: 49 4e 47 5f 49 4e 53 54 52 55 43 54 49 4f 4e 5f  ING_INSTRUCTION_
0c10: 4e 4f 44 45 20 61 6e 64 20 74 68 65 0a 6f 70 74  NODE and the.opt
0c20: 69 6f 6e 61 6c 20 61 72 67 75 6d 65 6e 74 20 3c  ional argument <
0c30: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6e 65 77 56  i class="m">newV
0c40: 61 6c 75 65 3c 2f 69 3e 20 69 73 20 67 69 76 65  alue</i> is give
0c50: 6e 2c 20 74 68 65 20 6e 6f 64 65 20 69 73 20 73  n, the node is s
0c60: 65 74 20 74 6f 20 74 68 61 74 0a 76 61 6c 75 65  et to that.value
0c70: 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 20 20 0a 0a  .</dd>..      ..
0c80: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
0c90: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  dt><b class="met
0ca0: 68 6f 64 22 3e 68 61 73 43 68 69 6c 64 4e 6f 64  hod">hasChildNod
0cb0: 65 73 3c 2f 62 3e 3c 2f 64 74 3e 0a 20 20 20 20  es</b></dt>.    
0cc0: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
0cd0: 31 20 69 66 20 74 68 65 20 6e 6f 64 65 20 68 61  1 if the node ha
0ce0: 73 20 63 68 69 6c 64 72 65 6e 2e 20 4f 74 68 65  s children. Othe
0cf0: 72 77 69 73 65 20 30 20 69 73 20 72 65 74 75 72  rwise 0 is retur
0d00: 6e 65 64 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  ned.</dd>.      
0d10: 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20  ..      .       
0d20: 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22   <dt>.<b class="
0d30: 6d 65 74 68 6f 64 22 3e 70 61 72 65 6e 74 4e 6f  method">parentNo
0d40: 64 65 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d  de</b> <b class=
0d50: 22 76 61 72 69 61 62 6c 65 22 3e 3f 6f 62 6a 56  "variable">?objV
0d60: 61 72 3f 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a 20 20  ar?</b>.</dt>.  
0d70: 20 20 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e        <dd>Return
0d80: 73 20 74 68 65 20 70 61 72 65 6e 74 20 6e 6f 64  s the parent nod
0d90: 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  e.</dd>.      ..
0da0: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
0db0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  dt><b class="met
0dc0: 68 6f 64 22 3e 63 68 69 6c 64 4e 6f 64 65 73 3c  hod">childNodes<
0dd0: 2f 62 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  /b></dt>.       
0de0: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c   <dd>Returns a l
0df0: 69 73 74 20 6f 66 20 64 69 72 65 63 74 20 63 68  ist of direct ch
0e00: 69 6c 64 72 65 6e 20 6e 6f 64 65 20 6f 62 6a 65  ildren node obje
0e10: 63 74 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  cts.</dd>.      
0e20: 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20  ..      .       
0e30: 20 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d   <dt><b class="m
0e40: 65 74 68 6f 64 22 3e 63 68 69 6c 64 4e 6f 64 65  ethod">childNode
0e50: 73 4c 69 76 65 3c 2f 62 3e 3c 2f 64 74 3e 0a 20  sLive</b></dt>. 
0e60: 20 20 20 20 20 20 20 3c 64 64 3e 52 65 74 75 72         <dd>Retur
0e70: 6e 73 20 61 20 22 6c 69 76 65 22 20 6e 6f 64 65  ns a "live" node
0e80: 4c 69 73 74 20 6f 62 6a 65 63 74 20 6f 66 20 74  List object of t
0e90: 68 65 20 63 68 69 6c 64 20 6e 6f 64 65 73 20 6f  he child nodes o
0ea0: 66 0a 74 68 65 20 6e 6f 64 65 20 69 6e 20 74 68  f.the node in th
0eb0: 65 20 73 65 6e 73 65 20 6f 66 20 74 68 65 20 44  e sense of the D
0ec0: 4f 4d 20 72 65 63 6f 6d 6d 65 6e 64 61 74 69 6f  OM recommendatio
0ed0: 6e 2e 20 54 68 69 73 20 6e 6f 64 65 4c 69 73 74  n. This nodeList
0ee0: 20 6f 62 6a 65 63 74 20 69 73 0a 22 6c 69 76 65   object is."live
0ef0: 22 20 69 6e 20 74 68 65 20 73 65 6e 73 65 20 74  " in the sense t
0f00: 68 61 74 2c 20 66 6f 72 20 69 6e 73 74 61 6e 63  hat, for instanc
0f10: 65 2c 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68  e, changes to th
0f20: 65 20 63 68 69 6c 64 72 65 6e 20 6f 66 0a 74 68  e children of.th
0f30: 65 20 6e 6f 64 65 20 6f 62 6a 65 63 74 20 74 68  e node object th
0f40: 61 74 20 69 74 20 77 61 73 20 63 72 65 61 74 65  at it was create
0f50: 64 20 66 72 6f 6d 20 61 72 65 20 69 6d 6d 65 64  d from are immed
0f60: 69 61 74 65 6c 79 20 72 65 66 6c 65 63 74 65 64  iately reflected
0f70: 20 69 6e 20 74 68 65 20 6e 6f 64 65 73 0a 72 65   in the nodes.re
0f80: 74 75 72 6e 65 64 20 62 79 20 74 68 65 20 4e 6f  turned by the No
0f90: 64 65 4c 69 73 74 20 61 63 63 65 73 73 6f 72 73  deList accessors
0fa0: 3b 20 69 74 20 69 73 20 6e 6f 74 20 61 20 73 74  ; it is not a st
0fb0: 61 74 69 63 20 73 6e 61 70 73 68 6f 74 20 6f 66  atic snapshot of
0fc0: 20 74 68 65 20 63 6f 6e 74 65 6e 74 0a 6f 66 20   the content.of 
0fd0: 74 68 65 20 6e 6f 64 65 2e 20 54 68 65 20 74 77  the node. The tw
0fe0: 6f 20 61 63 63 65 73 73 6f 72 73 20 6b 6e 6f 77  o accessors know
0ff0: 6e 20 62 79 20 74 68 65 20 6e 6f 64 65 4c 69 73  n by the nodeLis
1000: 74 20 6f 62 6a 65 63 74 20 61 72 65 20 22 69 74  t object are "it
1010: 65 6d 0a 26 6c 74 3b 69 6e 64 65 78 26 67 74 3b  em.&lt;index&gt;
1020: 22 2c 20 77 68 69 63 68 20 72 65 74 75 72 6e 73  ", which returns
1030: 20 74 68 65 20 69 6e 64 65 78 74 68 20 69 74 65   the indexth ite
1040: 6d 20 69 6e 20 74 68 65 20 63 6f 6c 6c 65 63 74  m in the collect
1050: 69 6f 6e 2c 20 61 6e 64 0a 22 6c 65 6e 67 74 68  ion, and."length
1060: 22 2c 20 77 68 69 63 68 20 72 65 74 75 72 6e 73  ", which returns
1070: 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 6e   the number of n
1080: 6f 64 65 73 20 69 6e 20 74 68 65 20 6c 69 73 74  odes in the list
1090: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20  .</dd>.      .. 
10a0: 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64       .        <d
10b0: 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  t>.<b class="met
10c0: 68 6f 64 22 3e 66 69 72 73 74 43 68 69 6c 64 3c  hod">firstChild<
10d0: 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 76 61  /b> <b class="va
10e0: 72 69 61 62 6c 65 22 3e 3f 6f 62 6a 56 61 72 3f  riable">?objVar?
10f0: 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20  </b>.</dt>.     
1100: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74     <dd>Returns t
1110: 68 65 20 66 69 72 73 74 20 63 68 69 6c 64 20 61  he first child a
1120: 73 20 61 20 6e 6f 64 65 20 6f 62 6a 65 63 74 2e  s a node object.
1130: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20  </dd>.      ..  
1140: 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74      .        <dt
1150: 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68  >.<b class="meth
1160: 6f 64 22 3e 6c 61 73 74 43 68 69 6c 64 3c 2f 62  od">lastChild</b
1170: 3e 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  > <b class="vari
1180: 61 62 6c 65 22 3e 3f 6f 62 6a 56 61 72 3f 3c 2f  able">?objVar?</
1190: 62 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  b>.</dt>.       
11a0: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65   <dd>Returns the
11b0: 20 6c 61 73 74 20 63 68 69 6c 64 20 61 73 20 61   last child as a
11c0: 20 6e 6f 64 65 20 6f 62 6a 65 63 74 2e 3c 2f 64   node object.</d
11d0: 64 3e 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20  d>.      .      
11e0: 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20  .      .        
11f0: 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d  <dt>.<b class="m
1200: 65 74 68 6f 64 22 3e 6e 65 78 74 53 69 62 6c 69  ethod">nextSibli
1210: 6e 67 3c 2f 62 3e 20 20 3c 62 20 63 6c 61 73 73  ng</b>  <b class
1220: 3d 22 76 61 72 69 61 62 6c 65 22 3e 3f 6f 62 6a  ="variable">?obj
1230: 56 61 72 3f 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a 20  Var?</b>.</dt>. 
1240: 20 20 20 20 20 20 20 3c 64 64 3e 52 65 74 75 72         <dd>Retur
1250: 6e 73 20 74 68 65 20 6e 65 78 74 20 73 69 62 6c  ns the next sibl
1260: 69 6e 67 20 72 65 6c 61 74 69 76 65 20 74 6f 20  ing relative to 
1270: 74 68 65 20 63 75 72 72 65 6e 74 20 6e 6f 64 65  the current node
1280: 20 61 73 20 61 20 6e 6f 64 65 0a 6f 62 6a 65 63   as a node.objec
1290: 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  t.</dd>.      ..
12a0: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
12b0: 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65  dt>.<b class="me
12c0: 74 68 6f 64 22 3e 70 72 65 76 69 6f 75 73 53 69  thod">previousSi
12d0: 62 6c 69 6e 67 3c 2f 62 3e 20 3c 62 20 63 6c 61  bling</b> <b cla
12e0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 3f 6f  ss="variable">?o
12f0: 62 6a 56 61 72 3f 3c 2f 62 3e 0a 3c 2f 64 74 3e  bjVar?</b>.</dt>
1300: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 74  .        <dd>Ret
1310: 75 72 6e 73 20 74 68 65 20 6e 65 78 74 20 73 69  urns the next si
1320: 62 6c 69 6e 67 20 72 65 6c 61 74 69 76 65 20 74  bling relative t
1330: 6f 20 74 68 65 20 63 75 72 72 65 6e 74 20 6e 6f  o the current no
1340: 64 65 20 61 73 20 61 20 6e 6f 64 65 0a 6f 62 6a  de as a node.obj
1350: 65 63 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  ect.</dd>.      
1360: 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20  ..      .       
1370: 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22   <dt>.<b class="
1380: 6d 65 74 68 6f 64 22 3e 67 65 74 45 6c 65 6d 65  method">getEleme
1390: 6e 74 73 42 79 54 61 67 4e 61 6d 65 3c 2f 62 3e  ntsByTagName</b>
13a0: 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6e 61   <i class="m">na
13b0: 6d 65 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20 20  me</i>.</dt>.   
13c0: 20 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73       <dd>Returns
13d0: 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 65   a list of all e
13e0: 6c 65 6d 65 6e 74 73 20 69 6e 20 74 68 65 20 73  lements in the s
13f0: 75 62 74 72 65 65 20 6d 61 74 63 68 69 6e 67 20  ubtree matching 
1400: 28 67 6c 6f 62 0a 73 74 79 6c 65 29 20 3c 69 20  (glob.style) <i 
1410: 63 6c 61 73 73 3d 22 6d 22 3e 6e 61 6d 65 3c 2f  class="m">name</
1420: 69 3e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a  i>.</dd>.      .
1430: 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20  .      .        
1440: 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d  <dt>.<b class="m
1450: 65 74 68 6f 64 22 3e 67 65 74 45 6c 65 6d 65 6e  ethod">getElemen
1460: 74 73 42 79 54 61 67 4e 61 6d 65 4e 53 3c 2f 62  tsByTagNameNS</b
1470: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 75  > <i class="m">u
1480: 72 69 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d  ri</i> <i class=
1490: 22 6d 22 3e 6c 6f 63 61 6c 6e 61 6d 65 3c 2f 69  "m">localname</i
14a0: 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  >.</dt>.        
14b0: 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69  <dd>Returns a li
14c0: 73 74 20 6f 66 20 61 6c 6c 20 65 6c 65 6d 65 6e  st of all elemen
14d0: 74 73 20 69 6e 20 74 68 65 20 73 75 62 74 72 65  ts in the subtre
14e0: 65 0a 6d 61 74 63 68 69 6e 67 20 28 67 6c 6f 62  e.matching (glob
14f0: 20 73 74 79 6c 65 29 20 3c 69 20 63 6c 61 73 73   style) <i class
1500: 3d 22 6d 22 3e 6c 6f 63 61 6c 6e 61 6d 65 3c 2f  ="m">localname</
1510: 69 3e 20 61 6e 64 20 68 61 76 69 6e 67 20 74 68  i> and having th
1520: 65 20 67 69 76 65 6e 20 6e 61 6d 65 73 70 61 63  e given namespac
1530: 65 0a 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 75  e.<i class="m">u
1540: 72 69 3c 2f 69 3e 2e 3c 2f 64 64 3e 0a 20 20 20  ri</i>.</dd>.   
1550: 20 20 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20     ..      .    
1560: 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73      <dt>.<b clas
1570: 73 3d 22 6d 65 74 68 6f 64 22 3e 67 65 74 45 6c  s="method">getEl
1580: 65 6d 65 6e 74 42 79 49 64 3c 2f 62 3e 20 3c 69  ementById</b> <i
1590: 20 63 6c 61 73 73 3d 22 6d 22 3e 69 64 3c 2f 69   class="m">id</i
15a0: 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  >.</dt>.        
15b0: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20  <dd>Returns the 
15c0: 6e 6f 64 65 20 68 61 76 69 6e 67 20 61 6e 20 69  node having an i
15d0: 64 20 61 74 74 72 69 62 75 74 65 20 77 69 74 68  d attribute with
15e0: 20 76 61 6c 75 65 0a 3c 69 20 63 6c 61 73 73 3d   value.<i class=
15f0: 22 6d 22 3e 69 64 3c 2f 69 3e 20 6f 72 20 74 68  "m">id</i> or th
1600: 65 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69  e empty string i
1610: 66 20 6e 6f 20 6e 6f 64 65 20 68 61 73 20 61 6e  f no node has an
1620: 20 69 64 20 61 74 74 72 69 62 75 74 65 20 77 69   id attribute wi
1630: 74 68 20 74 68 61 74 20 76 61 6c 75 65 2e 3c 2f  th that value.</
1640: 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20 20  dd>.      ..    
1650: 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 0a    .        <dt>.
1660: 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64  <b class="method
1670: 22 3e 68 61 73 41 74 74 72 69 62 75 74 65 3c 2f  ">hasAttribute</
1680: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  b> <i class="m">
1690: 61 74 74 72 69 62 75 74 65 4e 61 6d 65 3c 2f 69  attributeName</i
16a0: 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  >.</dt>.        
16b0: 3c 64 64 3e 52 65 74 75 72 6e 73 20 31 20 69 66  <dd>Returns 1 if
16c0: 20 74 68 65 20 6f 62 6a 65 63 74 20 6e 6f 64 65   the object node
16d0: 20 63 6f 6e 74 61 69 6e 73 20 61 6e 20 61 74 74   contains an att
16e0: 72 69 62 75 74 65 20 77 69 74 68 20 6e 61 6d 65  ribute with name
16f0: 0a 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 61 74  .<i class="m">at
1700: 74 72 69 62 75 74 65 4e 61 6d 65 3c 2f 69 3e 20  tributeName</i> 
1710: 2e 20 4f 74 68 65 72 77 69 73 65 20 30 20 69 73  . Otherwise 0 is
1720: 20 72 65 74 75 72 6e 65 64 2e 3c 2f 64 64 3e 0a   returned.</dd>.
1730: 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a 20        ..      . 
1740: 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63         <dt>.<b c
1750: 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 67 65  lass="method">ge
1760: 74 41 74 74 72 69 62 75 74 65 3c 2f 62 3e 20 3c  tAttribute</b> <
1770: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 61 74 74 72  i class="m">attr
1780: 69 62 75 74 65 4e 61 6d 65 20 20 3f 64 65 66 61  ibuteName  ?defa
1790: 75 6c 74 56 61 6c 75 65 3f 3c 2f 69 3e 0a 3c 2f  ultValue?</i>.</
17a0: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
17b0: 52 65 74 75 72 6e 73 20 74 68 65 20 76 61 6c 75  Returns the valu
17c0: 65 20 6f 66 20 74 68 65 20 61 74 74 72 69 62 75  e of the attribu
17d0: 74 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  te <i class="m">
17e0: 61 74 74 72 69 62 75 74 65 4e 61 6d 65 3c 2f 69  attributeName</i
17f0: 3e 2e 20 49 66 20 74 68 65 0a 61 74 74 72 69 62  >. If the.attrib
1800: 75 74 65 20 69 73 20 6e 6f 74 20 61 76 61 69 6c  ute is not avail
1810: 61 62 6c 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d  able <i class="m
1820: 22 3e 64 65 66 61 75 6c 74 56 61 6c 75 65 3c 2f  ">defaultValue</
1830: 69 3e 20 69 73 20 72 65 74 75 72 6e 65 64 2e 3c  i> is returned.<
1840: 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20  /dd>.      ..   
1850: 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e     .        <dt>
1860: 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f  .<b class="metho
1870: 64 22 3e 73 65 74 41 74 74 72 69 62 75 74 65 3c  d">setAttribute<
1880: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22  /b> <i class="m"
1890: 3e 61 74 74 72 69 62 75 74 65 4e 61 6d 65 20 6e  >attributeName n
18a0: 65 77 56 61 6c 75 65 20 0a 3f 61 74 74 72 69 62  ewValue .?attrib
18b0: 75 74 65 4e 61 6d 65 20 6e 65 77 56 61 6c 75 65  uteName newValue
18c0: 20 2e 2e 2e 3f 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a   ...?</i>.</dt>.
18d0: 20 20 20 20 20 20 20 20 3c 64 64 3e 53 65 74 73          <dd>Sets
18e0: 20 74 68 65 20 76 61 6c 75 65 20 66 6f 72 20 6f   the value for o
18f0: 6e 65 20 6f 72 20 6d 6f 72 65 20 61 74 74 72 69  ne or more attri
1900: 62 75 74 65 73 2e 20 45 76 65 72 79 0a 20 20 20  butes. Every.   
1910: 20 20 20 20 20 3c 69 20 63 6c 61 73 73 3d 22 6d       <i class="m
1920: 22 3e 61 74 74 72 69 62 75 74 65 4e 61 6d 65 3c  ">attributeName<
1930: 2f 69 3e 20 69 73 20 73 65 74 20 74 6f 20 74 68  /i> is set to th
1940: 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 0a  e corresponding.
1950: 20 20 20 20 20 20 20 20 3c 69 20 63 6c 61 73 73          <i class
1960: 3d 22 6d 22 3e 6e 65 77 56 61 6c 75 65 3c 2f 69  ="m">newValue</i
1970: 3e 2e 20 49 66 20 74 68 65 72 65 20 69 73 6e 27  >. If there isn'
1980: 74 20 61 6e 20 61 74 74 72 69 62 75 74 65 20 66  t an attribute f
1990: 6f 72 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 0a 20  or one or more. 
19a0: 20 20 20 20 20 20 20 6f 66 20 74 68 65 20 3c 69         of the <i
19b0: 20 63 6c 61 73 73 3d 22 6d 22 3e 61 74 74 72 69   class="m">attri
19c0: 62 75 74 65 4e 61 6d 65 3c 2f 69 3e 2c 20 74 68  buteName</i>, th
19d0: 69 73 20 77 69 6c 6c 20 63 72 65 61 74 65 20 74  is will create t
19e0: 68 61 74 20 61 74 74 72 69 62 75 74 65 2e 0a 20  hat attribute.. 
19f0: 20 20 20 20 20 20 20 49 74 20 69 73 20 6e 6f 74         It is not
1a00: 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 74 6f 20   recommended to 
1a10: 73 65 74 20 61 74 74 72 69 62 75 74 65 73 20 74  set attributes t
1a20: 68 61 74 20 6c 6f 6f 6b 20 6c 69 6b 65 20 78 6d  hat look like xm
1a30: 6c 0a 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70  l.        namesp
1a40: 61 63 65 20 64 65 63 6c 61 72 61 74 69 6f 6e 73  ace declarations
1a50: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20  .</dd>.      .. 
1a60: 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64       .        <d
1a70: 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  t>.<b class="met
1a80: 68 6f 64 22 3e 72 65 6d 6f 76 65 41 74 74 72 69  hod">removeAttri
1a90: 62 75 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  bute</b> <i clas
1aa0: 73 3d 22 6d 22 3e 61 74 74 72 69 62 75 74 65 4e  s="m">attributeN
1ab0: 61 6d 65 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20  ame</i>.</dt>.  
1ac0: 20 20 20 20 20 20 3c 64 64 3e 52 65 6d 6f 76 65        <dd>Remove
1ad0: 73 20 74 68 65 20 61 74 74 72 69 62 75 74 65 20  s the attribute 
1ae0: 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 61 74 74  <i class="m">att
1af0: 72 69 62 75 74 65 4e 61 6d 65 3c 2f 69 3e 2e 3c  ributeName</i>.<
1b00: 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20  /dd>.      ..   
1b10: 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e     .        <dt>
1b20: 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f  .<b class="metho
1b30: 64 22 3e 68 61 73 41 74 74 72 69 62 75 74 65 4e  d">hasAttributeN
1b40: 53 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  S</b> <i class="
1b50: 6d 22 3e 75 72 69 3c 2f 69 3e 20 3c 69 20 63 6c  m">uri</i> <i cl
1b60: 61 73 73 3d 22 6d 22 3e 6c 6f 63 61 6c 4e 61 6d  ass="m">localNam
1b70: 65 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20  e</i>.</dt>.    
1b80: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
1b90: 31 20 69 66 20 74 68 65 20 6f 62 6a 65 63 74 20  1 if the object 
1ba0: 6e 6f 64 65 20 63 6f 6e 74 61 69 6e 73 20 61 6e  node contains an
1bb0: 20 61 74 74 72 69 62 75 74 65 20 77 69 74 68 20   attribute with 
1bc0: 74 68 65 0a 6c 6f 63 61 6c 20 6e 61 6d 65 20 3c  the.local name <
1bd0: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6c 6f 63 61  i class="m">loca
1be0: 6c 4e 61 6d 65 3c 2f 69 3e 20 77 69 74 68 69 6e  lName</i> within
1bf0: 20 74 68 65 20 6e 61 6d 65 73 70 61 63 65 20 3c   the namespace <
1c00: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 75 72 69 3c  i class="m">uri<
1c10: 2f 69 3e 2e 20 20 4f 74 68 65 72 77 69 73 65 20  /i>.  Otherwise 
1c20: 30 20 69 73 0a 72 65 74 75 72 6e 65 64 2e 3c 2f  0 is.returned.</
1c30: 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20 20  dd>.      ..    
1c40: 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 0a    .        <dt>.
1c50: 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64  <b class="method
1c60: 22 3e 67 65 74 41 74 74 72 69 62 75 74 65 4e 53  ">getAttributeNS
1c70: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d  </b> <i class="m
1c80: 22 3e 75 72 69 3c 2f 69 3e 20 3c 69 20 63 6c 61  ">uri</i> <i cla
1c90: 73 73 3d 22 6d 22 3e 6c 6f 63 61 6c 4e 61 6d 65  ss="m">localName
1ca0: 0a 3f 64 65 66 61 75 6c 74 56 61 6c 75 65 3f 3c  .?defaultValue?<
1cb0: 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /i>.</dt>.      
1cc0: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68    <dd>Returns th
1cd0: 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 61  e value of the a
1ce0: 74 74 72 69 62 75 74 65 20 77 69 74 68 20 74 68  ttribute with th
1cf0: 65 20 6c 6f 63 61 6c 20 6e 61 6d 65 0a 3c 69 20  e local name.<i 
1d00: 63 6c 61 73 73 3d 22 6d 22 3e 6c 6f 63 61 6c 4e  class="m">localN
1d10: 61 6d 65 3c 2f 69 3e 20 77 69 74 68 69 6e 20 74  ame</i> within t
1d20: 68 65 20 6e 61 6d 65 73 70 61 63 65 20 55 52 49  he namespace URI
1d30: 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 75 72   <i class="m">ur
1d40: 69 3c 2f 69 3e 2e 20 49 66 20 74 68 65 20 6e 6f  i</i>. If the no
1d50: 64 65 20 64 6f 73 6e 27 74 20 68 61 76 65 0a 74  de dosn't have.t
1d60: 68 61 74 20 61 74 74 72 69 62 75 74 65 20 74 68  hat attribute th
1d70: 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 64  e <i class="m">d
1d80: 65 66 61 75 6c 74 56 61 6c 75 65 3c 2f 69 3e 20  efaultValue</i> 
1d90: 69 73 20 72 65 74 75 72 6e 65 64 2e 3c 2f 64 64  is returned.</dd
1da0: 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20  >.      ..      
1db0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62  .        <dt>.<b
1dc0: 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e   class="method">
1dd0: 73 65 74 41 74 74 72 69 62 75 74 65 4e 53 3c 2f  setAttributeNS</
1de0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  b> <i class="m">
1df0: 75 72 69 20 71 75 61 6c 69 66 69 65 64 4e 61 6d  uri qualifiedNam
1e00: 65 20 6e 65 77 56 61 6c 75 65 0a 3f 75 72 69 20  e newValue.?uri 
1e10: 71 75 61 6c 69 66 69 65 64 4e 61 6d 65 20 6e 65  qualifiedName ne
1e20: 77 56 61 6c 75 65 20 2e 2e 2e 3f 3c 2f 69 3e 20  wValue ...?</i> 
1e30: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
1e40: 64 3e 0a 3c 70 3e 53 65 74 73 20 74 68 65 20 76  d>.<p>Sets the v
1e50: 61 6c 75 65 20 66 6f 72 20 6f 6e 65 20 6f 72 20  alue for one or 
1e60: 6d 6f 72 65 20 66 75 6c 6c 20 71 75 61 6c 69 66  more full qualif
1e70: 69 65 64 0a 61 74 74 72 69 62 75 74 65 73 2e 20  ied.attributes. 
1e80: 45 76 65 72 79 20 61 74 74 72 69 62 75 74 65 20  Every attribute 
1e90: 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 71 75 61  <i class="m">qua
1ea0: 6c 69 66 69 65 64 4e 61 6d 65 3c 2f 69 3e 20 77  lifiedName</i> w
1eb0: 69 74 68 20 74 68 65 20 6e 61 6d 65 73 70 61 63  ith the namespac
1ec0: 65 20 55 52 49 0a 3c 69 20 63 6c 61 73 73 3d 22  e URI.<i class="
1ed0: 6d 22 3e 75 72 69 3c 2f 69 3e 20 77 69 6c 6c 20  m">uri</i> will 
1ee0: 62 65 20 73 65 74 20 74 6f 20 3c 69 20 63 6c 61  be set to <i cla
1ef0: 73 73 3d 22 6d 22 3e 6e 65 77 56 61 6c 75 65 3c  ss="m">newValue<
1f00: 2f 69 3e 2e 20 54 68 69 73 20 77 69 6c 6c 20 63  /i>. This will c
1f10: 72 65 61 74 65 20 61 20 6e 65 77 20 61 74 74 72  reate a new attr
1f20: 69 62 75 74 65 2c 20 69 66 0a 69 74 20 77 61 73  ibute, if.it was
1f30: 6e 27 74 20 61 76 61 69 6c 61 62 6c 65 20 62 65  n't available be
1f40: 66 6f 72 65 2e 20 49 66 20 79 6f 75 20 77 61 6e  fore. If you wan
1f50: 74 20 74 6f 20 73 65 74 20 61 6e 20 61 74 74 72  t to set an attr
1f60: 69 62 75 74 65 20 77 69 74 68 69 6e 20 61 20 6e  ibute within a n
1f70: 61 6d 65 73 70 61 63 65 0a 79 6f 75 20 6d 75 73  amespace.you mus
1f80: 74 20 73 70 65 63 69 66 79 20 74 68 65 20 61 74  t specify the at
1f90: 74 72 69 62 75 74 65 20 6e 61 6d 65 20 77 69 74  tribute name wit
1fa0: 68 20 70 72 65 66 69 78 2c 20 65 76 65 6e 20 69  h prefix, even i
1fb0: 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 73 65  f you want to se
1fc0: 74 20 61 6e 0a 61 6c 72 65 61 64 79 20 65 78 69  t an.already exi
1fd0: 73 74 69 6e 67 20 61 74 74 72 69 62 75 74 65 20  sting attribute 
1fe0: 74 6f 20 61 20 6e 65 77 20 76 61 6c 75 65 2e 20  to a new value. 
1ff0: 57 68 69 6c 65 20 73 65 61 72 63 68 69 6e 67 2c  While searching,
2000: 20 69 66 20 74 68 65 20 61 74 74 72 69 62 75 74   if the attribut
2010: 65 0a 61 6c 72 65 61 64 79 20 65 78 69 73 74 73  e.already exists
2020: 2c 20 6f 6e 6c 79 20 74 68 65 20 67 69 76 65 6e  , only the given
2030: 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 75 72   <i class="m">ur
2040: 69 3c 2f 69 3e 20 61 6e 64 20 74 68 65 20 6c 6f  i</i> and the lo
2050: 63 61 6c 6e 61 6d 65 20 6f 66 20 74 68 65 0a 3c  calname of the.<
2060: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 71 75 61 6c  i class="m">qual
2070: 69 66 69 65 64 4e 61 6d 65 3c 2f 69 3e 20 69 73  ifiedName</i> is
2080: 20 75 73 65 64 2e 3c 2f 70 3e 0a 0a 20 20 20 20   used.</p>..    
2090: 20 20 20 20 3c 70 72 65 20 63 6c 61 73 73 3d 22      <pre class="
20a0: 65 78 61 6d 70 6c 65 22 3e 24 6e 6f 64 65 20 73  example">$node s
20b0: 65 74 41 74 74 72 69 62 75 74 65 4e 53 20 22 68  etAttributeNS "h
20c0: 74 74 70 3a 2f 2f 73 6f 6d 65 2e 75 72 69 2e 63  ttp://some.uri.c
20d0: 6f 6d 2f 77 6f 77 22 20 70 72 65 66 69 78 3a 61  om/wow" prefix:a
20e0: 74 74 72 31 20 61 74 74 72 56 61 6c 75 65 3c 2f  ttr1 attrValue</
20f0: 70 72 65 3e 0a 0a 3c 70 3e 49 66 20 74 68 65 20  pre>..<p>If the 
2100: 75 72 69 20 69 73 20 74 68 65 20 65 6d 70 74 79  uri is the empty
2110: 20 73 74 72 69 6e 67 20 61 6e 64 20 74 68 65 20   string and the 
2120: 61 74 74 72 69 62 75 74 65 20 6e 61 6d 65 20 64  attribute name d
2130: 6f 65 73 6e 27 74 20 68 61 76 65 0a 61 20 70 72  oesn't have.a pr
2140: 65 66 69 78 2c 20 74 68 69 73 20 6d 65 74 68 6f  efix, this metho
2150: 64 20 68 61 73 20 74 68 65 20 73 61 6d 65 20 65  d has the same e
2160: 66 66 65 63 74 20 61 73 20 74 68 65 20 6d 65 74  ffect as the met
2170: 68 6f 64 0a 3c 62 3e 73 65 74 41 74 74 72 69 62  hod.<b>setAttrib
2180: 75 74 65 3c 2f 62 3e 2e 3c 2f 70 3e 0a 0a 20 20  ute</b>.</p>..  
2190: 20 20 20 20 20 20 3c 70 72 65 20 63 6c 61 73 73        <pre class
21a0: 3d 22 65 78 61 6d 70 6c 65 22 3e 24 6e 6f 64 65  ="example">$node
21b0: 20 73 65 74 41 74 74 72 69 62 75 74 65 4e 53 20   setAttributeNS 
21c0: 22 22 20 61 74 74 72 69 20 22 73 6f 6d 65 20 56  "" attri "some V
21d0: 61 6c 75 65 22 3c 2f 70 72 65 3e 0a 0a 3c 70 3e  alue"</pre>..<p>
21e0: 57 69 74 68 20 74 68 65 20 65 78 63 65 70 74 69  With the excepti
21f0: 6f 6e 73 20 6f 66 20 74 68 65 20 73 70 65 63 69  ons of the speci
2200: 61 6c 20 70 72 65 66 69 78 65 73 20 22 78 6d 6c  al prefixes "xml
2210: 6e 73 22 20 61 6e 64 20 22 78 6d 6c 22 20 79 6f  ns" and "xml" yo
2220: 75 0a 61 6c 77 61 79 73 20 6d 75 73 74 20 70 72  u.always must pr
2230: 6f 76 69 64 65 20 61 20 6e 6f 6e 20 65 6d 70 74  ovide a non empt
2240: 79 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 75  y <i class="m">u
2250: 72 69 3c 2f 69 3e 20 69 66 20 79 6f 75 72 20 3c  ri</i> if your <
2260: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 71 75 61 6c  i class="m">qual
2270: 69 66 69 65 64 4e 61 6d 65 3c 2f 69 3e 20 68 61  ifiedName</i> ha
2280: 73 20 61 0a 70 72 65 66 69 78 2e 20 49 74 20 69  s a.prefix. It i
2290: 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65  s not recommende
22a0: 64 20 74 6f 20 73 65 74 20 78 6d 6c 20 6e 61 6d  d to set xml nam
22b0: 65 73 70 61 63 65 20 64 65 63 6c 61 72 61 74 69  espace declarati
22c0: 6f 6e 73 2e 20 54 68 65 20 65 66 66 65 63 74 73  ons. The effects
22d0: 20 61 72 65 20 63 6f 6d 70 6c 69 63 61 74 65 64   are complicated
22e0: 20 61 6e 64 20 6e 6f 74 20 61 6c 77 61 79 73 20   and not always 
22f0: 6f 62 76 69 6f 75 73 20 75 70 20 74 6f 20 72 65  obvious up to re
2300: 73 75 6c 74 69 6e 67 20 61 20 6e 6f 74 20 77 65  sulting a not we
2310: 6c 6c 2d 66 6f 72 6d 65 64 20 73 65 72 69 61 6c  ll-formed serial
2320: 69 7a 61 74 69 6f 6e 73 20 61 66 74 65 72 20 66  izations after f
2330: 75 72 74 68 65 72 20 70 72 6f 63 65 73 73 69 6e  urther processin
2340: 67 2e 3c 2f 70 3e 0a 3c 2f 64 64 3e 0a 20 20 20  g.</p>.</dd>.   
2350: 20 20 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20     ..      .    
2360: 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73      <dt>.<b clas
2370: 73 3d 22 6d 65 74 68 6f 64 22 3e 72 65 6d 6f 76  s="method">remov
2380: 65 41 74 74 72 69 62 75 74 65 4e 53 3c 2f 62 3e  eAttributeNS</b>
2390: 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 75 72   <i class="m">ur
23a0: 69 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22  i</i> <i class="
23b0: 6d 22 3e 6c 6f 63 61 6c 4e 61 6d 65 3c 2f 69 3e  m">localName</i>
23c0: 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  .</dt>.        <
23d0: 64 64 3e 52 65 6d 6f 76 65 73 20 74 68 65 20 61  dd>Removes the a
23e0: 74 74 72 69 62 75 74 65 20 77 69 74 68 20 74 68  ttribute with th
23f0: 65 20 6c 6f 63 61 6c 20 6e 61 6d 65 20 3c 69 20  e local name <i 
2400: 63 6c 61 73 73 3d 22 6d 22 3e 6c 6f 63 61 6c 4e  class="m">localN
2410: 61 6d 65 3c 2f 69 3e 20 77 69 74 68 69 6e 0a 20  ame</i> within. 
2420: 74 68 65 20 6e 61 6d 65 73 70 61 63 65 20 3c 69  the namespace <i
2430: 20 63 6c 61 73 73 3d 22 6d 22 3e 75 72 69 3c 2f   class="m">uri</
2440: 69 3e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a  i>.</dd>.      .
2450: 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20  .      .        
2460: 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d  <dt>.<b class="m
2470: 65 74 68 6f 64 22 3e 61 74 74 72 69 62 75 74 65  ethod">attribute
2480: 73 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22  s</b> <b class="
2490: 6f 70 74 69 6f 6e 22 3e 3f 61 74 74 72 69 62 75  option">?attribu
24a0: 74 65 4e 61 6d 65 50 61 74 74 65 72 6e 3f 3c 2f  teNamePattern?</
24b0: 62 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  b>.</dt>.       
24c0: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 69 6e 66   <dd>Returns inf
24d0: 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 20 74  ormation about t
24e0: 68 65 20 61 74 74 72 69 75 62 74 65 73 20 6d 61  he attriubtes ma
24f0: 74 63 68 69 6e 67 20 74 68 65 0a 20 20 20 20 20  tching the.     
2500: 20 20 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e     <i class="m">
2510: 61 74 74 72 69 62 75 74 65 4e 61 6d 65 50 61 74  attributeNamePat
2520: 74 65 72 6e 3c 2f 69 3e 2e 20 49 66 20 3c 69 20  tern</i>. If <i 
2530: 63 6c 61 73 73 3d 22 6d 22 3e 61 74 74 72 69 62  class="m">attrib
2540: 75 74 65 4e 61 6d 65 50 61 74 74 65 72 6e 3c 2f  uteNamePattern</
2550: 69 3e 0a 20 20 20 20 20 20 20 20 69 73 6e 27 74  i>.        isn't
2560: 20 67 69 76 65 6e 2c 20 69 6e 66 6f 72 6d 61 74   given, informat
2570: 69 6f 6e 20 61 62 6f 75 74 20 61 6c 6c 20 61 74  ion about all at
2580: 74 72 69 62 75 74 65 73 20 61 72 65 20 72 65 74  tributes are ret
2590: 75 72 6e 65 64 2e 0a 20 20 20 20 20 20 20 20 54  urned..        T
25a0: 68 65 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20  he return value 
25b0: 69 73 20 61 20 54 63 6c 20 6c 69 73 74 2c 20 74  is a Tcl list, t
25c0: 68 65 20 65 6c 65 6d 65 6e 74 73 20 6a 75 73 74  he elements just
25d0: 20 74 68 65 0a 20 20 20 20 20 20 20 20 61 74 74   the.        att
25e0: 72 69 75 62 75 74 65 20 6e 61 6d 65 20 69 6e 20  riubute name in 
25f0: 63 61 73 65 20 6f 66 20 6e 6f 6e 20 6e 61 6d 65  case of non name
2600: 73 70 61 63 65 64 20 61 74 74 72 69 75 62 74 65  spaced attriubte
2610: 73 20 61 6e 64 20 74 68 72 65 65 0a 20 20 20 20  s and three.    
2620: 20 20 20 20 65 6c 65 6d 65 6e 74 20 73 75 62 6c      element subl
2630: 69 73 74 73 20 66 6f 72 20 6e 61 6d 65 73 70 61  ists for namespa
2640: 63 65 64 20 61 74 74 72 69 62 75 74 65 73 2e 20  ced attributes. 
2650: 6e 20 63 61 73 65 20 6f 66 20 61 6e 0a 20 20 20  n case of an.   
2660: 20 20 20 20 20 22 6f 72 64 69 6e 61 72 79 22 20       "ordinary" 
2670: 6e 61 6d 65 73 70 61 63 65 64 20 61 74 74 72 69  namespaced attri
2680: 62 75 74 65 2c 20 74 68 65 20 73 75 62 6c 69 73  bute, the sublis
2690: 74 20 65 6c 65 6d 65 6e 74 73 20 61 72 65 0a 20  t elements are. 
26a0: 20 20 20 20 20 20 20 7b 26 6c 74 3b 6c 6f 63 61         {&lt;loca
26b0: 6c 6e 61 6d 65 26 67 74 3b 20 26 6c 74 3b 70 72  lname&gt; &lt;pr
26c0: 65 66 69 78 26 67 74 3b 20 26 6c 74 3b 6e 61 6d  efix&gt; &lt;nam
26d0: 65 73 70 61 63 65 5f 75 72 69 26 67 74 3b 7d 2e  espace_uri&gt;}.
26e0: 20 49 6e 20 74 68 65 20 73 70 65 63 69 61 6c 20   In the special 
26f0: 63 61 73 65 20 6f 66 0a 20 20 20 20 20 20 20 20  case of.        
2700: 61 6e 20 78 6d 6c 20 6e 61 6d 65 73 70 61 63 65  an xml namespace
2710: 20 64 65 63 6c 61 72 61 74 69 6f 6e 20 69 74 20   declaration it 
2720: 69 73 20 7b 26 6c 74 3b 74 68 65 20 70 72 65 66  is {&lt;the pref
2730: 69 78 20 64 65 66 69 6e 65 64 26 67 74 3b 0a 20  ix defined&gt;. 
2740: 20 20 20 20 20 20 20 26 6c 74 3b 6c 6f 63 61 6c         &lt;local
2750: 6e 61 6d 65 26 67 74 3b 20 22 22 7d 2e 0a 20 20  name&gt; ""}..  
2760: 20 20 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20        </dd>.    
2770: 20 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20    ..      .     
2780: 20 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73     <dt>.<b class
2790: 3d 22 6d 65 74 68 6f 64 22 3e 61 74 74 72 69 62  ="method">attrib
27a0: 75 74 65 4e 61 6d 65 73 3c 2f 62 3e 20 3c 62 20  uteNames</b> <b 
27b0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 3f  class="option">?
27c0: 61 74 74 72 69 62 75 74 65 4e 61 6d 65 50 61 74  attributeNamePat
27d0: 74 65 72 6e 3f 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a  tern?</b>.</dt>.
27e0: 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 74 75          <dd>Retu
27f0: 72 6e 73 20 61 20 66 6c 61 74 20 6c 69 73 74 20  rns a flat list 
2800: 6f 66 20 61 6c 6c 20 61 74 74 72 69 62 75 74 65  of all attribute
2810: 73 20 6e 61 6d 65 73 20 28 61 73 20 66 6f 75 6e  s names (as foun
2820: 64 20 69 6e 0a 20 20 20 20 20 20 20 20 74 68 65  d in.        the
2830: 20 58 4d 4c 20 73 6f 75 72 63 65 29 20 6d 61 74   XML source) mat
2840: 63 68 69 6e 67 20 74 68 65 20 3c 69 20 63 6c 61  ching the <i cla
2850: 73 73 3d 22 6d 22 3e 61 74 74 72 69 62 75 74 65  ss="m">attribute
2860: 4e 61 6d 65 50 61 74 74 65 72 6e 3c 2f 69 3e 2e  NamePattern</i>.
2870: 20 49 66 0a 20 20 20 20 20 20 20 20 3c 69 20 63   If.        <i c
2880: 6c 61 73 73 3d 22 6d 22 3e 61 74 74 72 69 62 75  lass="m">attribu
2890: 74 65 4e 61 6d 65 50 61 74 74 65 72 6e 3c 2f 69  teNamePattern</i
28a0: 3e 20 69 73 6e 27 74 20 67 69 76 65 6e 2c 20 61  > isn't given, a
28b0: 6c 6c 20 61 74 74 72 69 62 75 74 65 20 6e 61 6d  ll attribute nam
28c0: 65 73 0a 20 20 20 20 20 20 20 20 61 72 65 20 72  es.        are r
28d0: 65 74 75 72 6e 65 64 20 61 73 20 61 20 54 63 6c  eturned as a Tcl
28e0: 20 6c 69 73 74 2e 3c 2f 64 64 3e 0a 20 20 20 20   list.</dd>.    
28f0: 20 20 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20    .      .      
2900: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62  .        <dt>.<b
2910: 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e   class="method">
2920: 61 70 70 65 6e 64 43 68 69 6c 64 3c 2f 62 3e 20  appendChild</b> 
2930: 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6e 65 77  <i class="m">new
2940: 43 68 69 6c 64 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a  Child</i>.</dt>.
2950: 20 20 20 20 20 20 20 20 3c 64 64 3e 41 70 70 65          <dd>Appe
2960: 6e 64 73 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22  nds <i class="m"
2970: 3e 6e 65 77 43 68 69 6c 64 3c 2f 69 3e 20 74 6f  >newChild</i> to
2980: 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20   the end of the 
2990: 63 68 69 6c 64 20 6c 69 73 74 20 6f 66 20 74 68  child list of th
29a0: 65 0a 6e 6f 64 65 2e 3c 2f 64 64 3e 0a 20 20 20  e.node.</dd>.   
29b0: 20 20 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20     ..      .    
29c0: 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73      <dt>.<b clas
29d0: 73 3d 22 6d 65 74 68 6f 64 22 3e 69 6e 73 65 72  s="method">inser
29e0: 74 42 65 66 6f 72 65 3c 2f 62 3e 20 3c 69 20 63  tBefore</b> <i c
29f0: 6c 61 73 73 3d 22 6d 22 3e 6e 65 77 43 68 69 6c  lass="m">newChil
2a00: 64 3c 2f 69 3e 20 20 3c 69 20 63 6c 61 73 73 3d  d</i>  <i class=
2a10: 22 6d 22 3e 72 65 66 43 68 69 6c 64 3c 2f 69 3e  "m">refChild</i>
2a20: 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  .</dt>.        <
2a30: 64 64 3e 49 6e 73 65 72 74 73 20 3c 69 20 63 6c  dd>Inserts <i cl
2a40: 61 73 73 3d 22 6d 22 3e 6e 65 77 43 68 69 6c 64  ass="m">newChild
2a50: 3c 2f 69 3e 20 62 65 66 6f 72 65 20 74 68 65 20  </i> before the 
2a60: 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 72 65 66  <i class="m">ref
2a70: 43 68 69 6c 64 3c 2f 69 3e 20 69 6e 74 6f 20 74  Child</i> into t
2a80: 68 65 20 6c 69 73 74 20 6f 66 0a 63 68 69 6c 64  he list of.child
2a90: 72 65 6e 20 6f 66 20 6e 6f 64 65 2e 20 49 66 20  ren of node. If 
2aa0: 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 72 65 66  <i class="m">ref
2ab0: 43 68 69 6c 64 3c 2f 69 3e 20 69 73 20 74 68 65  Child</i> is the
2ac0: 20 65 6d 70 74 79 20 73 74 72 69 6e 67 2c 20 69   empty string, i
2ad0: 6e 73 65 72 74 0a 3c 69 20 63 6c 61 73 73 3d 22  nsert.<i class="
2ae0: 6d 22 3e 6e 65 77 43 68 69 6c 64 3c 2f 69 3e 20  m">newChild</i> 
2af0: 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68  at the end of th
2b00: 65 20 63 68 69 6c 64 20 6e 6f 64 65 73 20 6c 69  e child nodes li
2b10: 73 74 20 6f 66 20 74 68 61 74 20 6e 6f 64 65 2e  st of that node.
2b20: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20  </dd>.      ..  
2b30: 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74      .        <dt
2b40: 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68  >.<b class="meth
2b50: 6f 64 22 3e 72 65 70 6c 61 63 65 43 68 69 6c 64  od">replaceChild
2b60: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d  </b> <i class="m
2b70: 22 3e 6e 65 77 43 68 69 6c 64 3c 2f 69 3e 20 20  ">newChild</i>  
2b80: 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6f 6c 64  <i class="m">old
2b90: 43 68 69 6c 64 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a  Child</i>.</dt>.
2ba0: 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 70 6c          <dd>Repl
2bb0: 61 63 65 73 20 3c 69 20 63 6c 61 73 73 3d 22 6d  aces <i class="m
2bc0: 22 3e 6f 6c 64 43 68 69 6c 64 3c 2f 69 3e 20 77  ">oldChild</i> w
2bd0: 69 74 68 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22  ith <i class="m"
2be0: 3e 6e 65 77 43 68 69 6c 64 3c 2f 69 3e 20 69 6e  >newChild</i> in
2bf0: 20 74 68 65 20 6c 69 73 74 20 6f 66 0a 63 68 69   the list of.chi
2c00: 6c 64 72 65 6e 20 6f 66 20 74 68 61 74 20 6e 6f  ldren of that no
2c10: 64 65 2e 20 54 68 65 20 3c 69 20 63 6c 61 73 73  de. The <i class
2c20: 3d 22 6d 22 3e 6f 6c 64 43 68 69 6c 64 3c 2f 69  ="m">oldChild</i
2c30: 3e 20 6e 6f 64 65 20 77 69 6c 6c 20 62 65 20 70  > node will be p
2c40: 61 72 74 20 6f 66 20 74 68 65 0a 64 6f 63 75 6d  art of the.docum
2c50: 65 6e 74 20 66 72 61 67 6d 65 6e 74 20 6c 69 73  ent fragment lis
2c60: 74 20 61 66 74 65 72 20 74 68 69 73 20 6f 70 65  t after this ope
2c70: 72 61 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20  ration.</dd>.   
2c80: 20 20 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20     ..      .    
2c90: 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73      <dt>.<b clas
2ca0: 73 3d 22 6d 65 74 68 6f 64 22 3e 72 65 6d 6f 76  s="method">remov
2cb0: 65 43 68 69 6c 64 3c 2f 62 3e 20 3c 69 20 63 6c  eChild</b> <i cl
2cc0: 61 73 73 3d 22 6d 22 3e 63 68 69 6c 64 3c 2f 69  ass="m">child</i
2cd0: 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  >.</dt>.        
2ce0: 3c 64 64 3e 52 65 6d 6f 76 65 73 20 3c 69 20 63  <dd>Removes <i c
2cf0: 6c 61 73 73 3d 22 6d 22 3e 63 68 69 6c 64 3c 2f  lass="m">child</
2d00: 69 3e 20 66 72 6f 6d 20 74 68 65 20 6c 69 73 74  i> from the list
2d10: 20 6f 66 20 63 68 69 6c 64 72 65 6e 20 6f 66 20   of children of 
2d20: 74 68 61 74 20 6e 6f 64 65 2e 0a 3c 69 20 63 6c  that node..<i cl
2d30: 61 73 73 3d 22 6d 22 3e 63 68 69 6c 64 3c 2f 69  ass="m">child</i
2d40: 3e 20 77 69 6c 6c 20 62 65 20 70 61 72 74 20 6f  > will be part o
2d50: 66 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 20 66  f the document f
2d60: 72 61 67 6d 65 6e 74 20 6c 69 73 74 20 61 66 74  ragment list aft
2d70: 65 72 20 74 68 69 73 0a 6f 70 65 72 61 74 69 6f  er this.operatio
2d80: 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  n.</dd>.      ..
2d90: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
2da0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  dt><b class="met
2db0: 68 6f 64 22 3e 64 65 6c 65 74 65 3c 2f 62 3e 3c  hod">delete</b><
2dc0: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
2dd0: 3e 44 65 6c 65 74 65 73 20 74 68 65 20 67 69 76  >Deletes the giv
2de0: 65 6e 20 6e 6f 64 65 20 61 6e 64 20 69 74 73 20  en node and its 
2df0: 63 6f 6d 70 6c 65 74 65 20 63 68 69 6c 64 20 74  complete child t
2e00: 72 65 65 0a 61 6e 64 20 66 72 65 65 73 20 74 68  ree.and frees th
2e10: 65 20 63 6f 6d 70 6c 65 74 65 20 69 6e 74 65 72  e complete inter
2e20: 6e 61 6c 20 6d 65 6d 6f 72 79 2e 20 54 68 65 20  nal memory. The 
2e30: 61 66 66 65 63 74 65 64 20 6e 6f 64 65 73 20 61  affected nodes a
2e40: 72 65 20 6e 6f 74 20 61 63 63 65 73 73 69 62 6c  re not accessibl
2e50: 65 0a 74 68 72 6f 75 67 68 20 74 68 65 20 64 6f  e.through the do
2e60: 63 75 6d 65 6e 74 20 66 72 61 67 6d 65 6e 74 20  cument fragment 
2e70: 6c 69 73 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 20  list.</dd>.     
2e80: 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20   ..      .      
2e90: 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d    <dt>.<b class=
2ea0: 22 6d 65 74 68 6f 64 22 3e 63 6c 6f 6e 65 4e 6f  "method">cloneNo
2eb0: 64 65 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d  de</b> <b class=
2ec0: 22 6f 70 74 69 6f 6e 22 3e 3f 2d 64 65 65 70 3f  "option">?-deep?
2ed0: 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20  </b>.</dt>.     
2ee0: 20 20 20 3c 64 64 3e 43 6c 6f 6e 65 73 20 74 68     <dd>Clones th
2ef0: 69 73 20 6e 6f 64 65 20 61 6e 64 20 61 64 64 73  is node and adds
2f00: 20 74 68 65 20 6e 65 77 20 63 72 65 61 74 65 20   the new create 
2f10: 6e 6f 64 65 20 69 6e 74 6f 20 74 68 65 20 64 6f  node into the do
2f20: 63 75 6d 65 6e 74 0a 66 72 61 67 6d 65 6e 74 20  cument.fragment 
2f30: 6c 69 73 74 2e 20 49 66 20 74 68 65 20 3c 69 20  list. If the <i 
2f40: 63 6c 61 73 73 3d 22 6d 22 3e 2d 64 65 65 70 3c  class="m">-deep<
2f50: 2f 69 3e 20 6f 70 74 69 6f 6e 20 69 73 20 73 70  /i> option is sp
2f60: 65 63 69 66 69 65 64 2c 20 61 6c 6c 20 64 65 73  ecified, all des
2f70: 63 65 6e 64 61 6e 74 20 6e 6f 64 65 73 0a 61 72  cendant nodes.ar
2f80: 65 20 61 6c 73 6f 20 63 6c 6f 6e 65 64 2e 3c 2f  e also cloned.</
2f90: 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20 20  dd>.      ..    
2fa0: 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 0a    .        <dt>.
2fb0: 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64  <b class="method
2fc0: 22 3e 6f 77 6e 65 72 44 6f 63 75 6d 65 6e 74 3c  ">ownerDocument<
2fd0: 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 76 61  /b> <b class="va
2fe0: 72 69 61 62 6c 65 22 3e 3f 64 6f 6d 4f 62 6a 56  riable">?domObjV
2ff0: 61 72 3f 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a 20 20  ar?</b>.</dt>.  
3000: 20 20 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e        <dd>Return
3010: 73 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 20 6f  s the document o
3020: 62 6a 65 63 74 20 6f 66 20 74 68 65 20 64 6f 63  bject of the doc
3030: 75 6d 65 6e 74 20 74 68 69 73 20 6e 6f 64 65 20  ument this node 
3040: 62 65 6c 6f 6e 67 73 0a 74 6f 2e 3c 2f 64 64 3e  belongs.to.</dd>
3050: 0a 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a  .      ..      .
3060: 20 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62 20          <dt>.<b 
3070: 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 66  class="method">f
3080: 69 6e 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ind</b> <i class
3090: 3d 22 6d 22 3e 61 74 74 72 4e 61 6d 65 3c 2f 69  ="m">attrName</i
30a0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 61  > <i class="m">a
30b0: 74 74 72 56 61 6c 3c 2f 69 3e 0a 3c 62 20 63 6c  ttrVal</i>.<b cl
30c0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 3f 6f 62  ass="option">?ob
30d0: 6a 56 61 72 3f 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a  jVar?</b>.</dt>.
30e0: 20 20 20 20 20 20 20 20 3c 64 64 3e 46 69 6e 64          <dd>Find
30f0: 73 20 74 68 65 20 6e 6f 64 65 20 77 69 74 68 20  s the node with 
3100: 74 68 65 20 61 74 74 72 69 62 75 74 65 20 6e 61  the attribute na
3110: 6d 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  me <i class="m">
3120: 61 74 74 72 4e 61 6d 65 3c 2f 69 3e 2c 20 61 6e  attrName</i>, an
3130: 64 0a 61 74 74 72 69 62 75 74 65 20 76 61 6c 75  d.attribute valu
3140: 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 61  e <i class="m">a
3150: 74 74 72 56 61 6c 3c 2f 69 3e 20 69 6e 20 74 68  ttrVal</i> in th
3160: 65 20 73 75 62 74 72 65 65 20 73 74 61 72 74 69  e subtree starti
3170: 6e 67 20 74 68 65 20 63 75 72 72 65 6e 74 20 6e  ng the current n
3180: 6f 64 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  ode.</dd>.      
3190: 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20  ..      .       
31a0: 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22   <dt>.<b class="
31b0: 6d 65 74 68 6f 64 22 3e 63 68 69 6c 64 3c 2f 62  method">child</b
31c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6e  > <i class="m">n
31d0: 75 6d 62 65 72 7c 61 6c 6c 3c 2f 69 3e 20 3c 62  umber|all</i> <b
31e0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
31f0: 74 79 70 65 3c 2f 62 3e 0a 3c 62 20 63 6c 61 73  type</b>.<b clas
3200: 73 3d 22 6f 70 74 69 6f 6e 22 3e 61 74 74 72 4e  s="option">attrN
3210: 61 6d 65 20 61 74 74 72 56 61 6c 75 65 3c 2f 62  ame attrValue</b
3220: 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  >.</dt>.        
3230: 3c 64 64 3e 28 58 50 6f 69 6e 74 65 72 29 20 63  <dd>(XPointer) c
3240: 68 69 6c 64 3c 2f 64 64 3e 0a 20 20 20 20 20 20  hild</dd>.      
3250: 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 0a 20  .      .      . 
3260: 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63         <dt>.<b c
3270: 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 64 65  lass="method">de
3280: 73 63 65 6e 64 61 6e 74 3c 2f 62 3e 20 3c 69 20  scendant</b> <i 
3290: 63 6c 61 73 73 3d 22 6d 22 3e 6e 75 6d 62 65 72  class="m">number
32a0: 7c 61 6c 6c 3c 2f 69 3e 20 3c 62 20 63 6c 61 73  |all</i> <b clas
32b0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 74 79 70 65 3c  s="option">type<
32c0: 2f 62 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  /b>.<b class="op
32d0: 74 69 6f 6e 22 3e 61 74 74 72 4e 61 6d 65 20 61  tion">attrName a
32e0: 74 74 72 56 61 6c 75 65 3c 2f 62 3e 0a 3c 2f 64  ttrValue</b>.</d
32f0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 28  t>.        <dd>(
3300: 58 50 6f 69 6e 74 65 72 29 20 64 65 73 63 65 6e  XPointer) descen
3310: 64 61 6e 74 3c 2f 64 64 3e 0a 20 20 20 20 20 20  dant</dd>.      
3320: 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20  ..      .       
3330: 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22   <dt>.<b class="
3340: 6d 65 74 68 6f 64 22 3e 61 6e 63 65 73 74 6f 72  method">ancestor
3350: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d  </b> <i class="m
3360: 22 3e 6e 75 6d 62 65 72 7c 61 6c 6c 3c 2f 69 3e  ">number|all</i>
3370: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
3380: 6e 22 3e 74 79 70 65 3c 2f 62 3e 0a 3c 62 20 63  n">type</b>.<b c
3390: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 61 74  lass="option">at
33a0: 74 72 4e 61 6d 65 20 61 74 74 72 56 61 6c 75 65  trName attrValue
33b0: 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20  </b>.</dt>.     
33c0: 20 20 20 3c 64 64 3e 28 58 50 6f 69 6e 74 65 72     <dd>(XPointer
33d0: 29 20 61 6e 63 65 73 74 6f 72 3c 2f 64 64 3e 0a  ) ancestor</dd>.
33e0: 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a 20        ..      . 
33f0: 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63         <dt>.<b c
3400: 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 66 73  lass="method">fs
3410: 69 62 6c 69 6e 67 3c 2f 62 3e 20 3c 69 20 63 6c  ibling</b> <i cl
3420: 61 73 73 3d 22 6d 22 3e 6e 75 6d 62 65 72 7c 61  ass="m">number|a
3430: 6c 6c 3c 2f 69 3e 20 3c 62 20 63 6c 61 73 73 3d  ll</i> <b class=
3440: 22 6f 70 74 69 6f 6e 22 3e 74 79 70 65 3c 2f 62  "option">type</b
3450: 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  >.<b class="opti
3460: 6f 6e 22 3e 61 74 74 72 4e 61 6d 65 20 61 74 74  on">attrName att
3470: 72 56 61 6c 75 65 3c 2f 62 3e 0a 3c 2f 64 74 3e  rValue</b>.</dt>
3480: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 28 58 50  .        <dd>(XP
3490: 6f 69 6e 74 65 72 29 20 66 73 69 62 6c 69 6e 67  ointer) fsibling
34a0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20  </dd>.      ..  
34b0: 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74      .        <dt
34c0: 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68  >.<b class="meth
34d0: 6f 64 22 3e 70 73 69 62 6c 69 6e 67 3c 2f 62 3e  od">psibling</b>
34e0: 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 6e 75   <i class="m">nu
34f0: 6d 62 65 72 7c 61 6c 6c 3c 2f 69 3e 20 3c 62 20  mber|all</i> <b 
3500: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 74  class="option">t
3510: 79 70 65 3c 2f 62 3e 0a 3c 62 20 63 6c 61 73 73  ype</b>.<b class
3520: 3d 22 6f 70 74 69 6f 6e 22 3e 61 74 74 72 4e 61  ="option">attrNa
3530: 6d 65 20 61 74 74 72 56 61 6c 75 65 3c 2f 62 3e  me attrValue</b>
3540: 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  .</dt>.        <
3550: 64 64 3e 28 58 50 6f 69 6e 74 65 72 29 20 70 73  dd>(XPointer) ps
3560: 69 62 6c 69 6e 67 3c 2f 64 64 3e 0a 20 20 20 20  ibling</dd>.    
3570: 20 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20    ..      .     
3580: 20 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73     <dt>.<b class
3590: 3d 22 6d 65 74 68 6f 64 22 3e 72 6f 6f 74 3c 2f  ="method">root</
35a0: 62 3e 20 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>  <b class="op
35b0: 74 69 6f 6e 22 3e 6f 62 6a 56 61 72 3c 2f 62 3e  tion">objVar</b>
35c0: 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  .</dt>.        <
35d0: 64 64 3e 28 58 50 6f 69 6e 74 65 72 29 20 72 6f  dd>(XPointer) ro
35e0: 6f 74 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  ot</dd>.      ..
35f0: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
3600: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  dt><b class="met
3610: 68 6f 64 22 3e 74 65 78 74 3c 2f 62 3e 3c 2f 64  hod">text</b></d
3620: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52  t>.        <dd>R
3630: 65 74 75 72 6e 73 20 61 6c 6c 20 74 65 78 74 20  eturns all text 
3640: 6e 6f 64 65 20 63 68 69 6c 64 72 65 6e 20 6f 66  node children of
3650: 20 74 68 61 74 20 63 75 72 72 65 6e 74 20 6e 6f   that current no
3660: 64 65 20 63 6f 6d 62 69 6e 65 64 2c 0a 69 2e 65  de combined,.i.e
3670: 2e 20 61 70 70 65 6e 64 65 64 20 69 6e 74 6f 20  . appended into 
3680: 6f 6e 65 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e  one string.</dd>
3690: 0a 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a  .      ..      .
36a0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 62 20 63          <dt><b c
36b0: 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 74 61  lass="method">ta
36c0: 72 67 65 74 3c 2f 62 3e 3c 2f 64 74 3e 0a 20 20  rget</b></dt>.  
36d0: 20 20 20 20 20 20 3c 64 64 3e 46 6f 72 20 61 20        <dd>For a 
36e0: 70 72 6f 63 65 73 73 69 6e 67 20 69 6e 73 74 72  processing instr
36f0: 75 63 74 69 6f 6e 20 6e 6f 64 65 20 74 68 65 20  uction node the 
3700: 74 61 72 67 65 74 20 70 61 72 74 20 69 73 20 72  target part is r
3710: 65 74 75 72 6e 65 64 2e 0a 4f 74 68 65 72 77 69  eturned..Otherwi
3720: 73 65 20 61 6e 20 65 72 72 6f 72 20 69 73 20 67  se an error is g
3730: 65 6e 65 72 61 74 65 64 2e 3c 2f 64 64 3e 0a 20  enerated.</dd>. 
3740: 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a 20 20       ..      .  
3750: 20 20 20 20 20 20 3c 64 74 3e 3c 62 20 63 6c 61        <dt><b cla
3760: 73 73 3d 22 6d 65 74 68 6f 64 22 3e 64 61 74 61  ss="method">data
3770: 3c 2f 62 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  </b></dt>.      
3780: 20 20 3c 64 64 3e 46 6f 72 20 61 20 70 72 6f 63    <dd>For a proc
3790: 65 73 73 69 6e 67 20 69 6e 73 74 72 75 63 74 69  essing instructi
37a0: 6f 6e 20 6e 6f 64 65 20 74 68 65 20 64 61 74 61  on node the data
37b0: 20 70 61 72 74 20 69 73 20 72 65 74 75 72 6e 65   part is returne
37c0: 64 2e 20 46 6f 72 0a 61 20 74 65 78 74 20 6e 6f  d. For.a text no
37d0: 64 65 2c 20 63 6f 6d 6d 65 6e 74 20 6e 6f 64 65  de, comment node
37e0: 20 6f 72 20 63 64 61 74 61 20 73 65 63 74 69 6f   or cdata sectio
37f0: 6e 20 6e 6f 64 65 20 74 68 65 20 76 61 6c 75 65  n node the value
3800: 20 69 73 20 72 65 74 75 72 6e 65 64 2e 0a 4f 74   is returned..Ot
3810: 68 65 72 77 69 73 65 20 61 6e 20 65 72 72 6f 72  herwise an error
3820: 20 69 73 20 67 65 6e 65 72 61 74 65 64 2e 3c 2f   is generated.</
3830: 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20 20  dd>.      ..    
3840: 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c    .        <dt><
3850: 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22  b class="method"
3860: 3e 70 72 65 66 69 78 3c 2f 62 3e 3c 2f 64 74 3e  >prefix</b></dt>
3870: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 74  .        <dd>Ret
3880: 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 73 70 61  urns the namespa
3890: 63 65 20 70 72 65 66 69 78 2e 3c 2f 64 64 3e 0a  ce prefix.</dd>.
38a0: 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a 20        ..      . 
38b0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 62 20 63 6c         <dt><b cl
38c0: 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 6e 61 6d  ass="method">nam
38d0: 65 73 70 61 63 65 55 52 49 3c 2f 62 3e 3c 2f 64  espaceURI</b></d
38e0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52  t>.        <dd>R
38f0: 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 73  eturns the names
3900: 70 61 63 65 20 55 52 49 2e 3c 2f 64 64 3e 0a 20  pace URI.</dd>. 
3910: 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a 20 20       ..      .  
3920: 20 20 20 20 20 20 3c 64 74 3e 3c 62 20 63 6c 61        <dt><b cla
3930: 73 73 3d 22 6d 65 74 68 6f 64 22 3e 6c 6f 63 61  ss="method">loca
3940: 6c 4e 61 6d 65 3c 2f 62 3e 3c 2f 64 74 3e 0a 20  lName</b></dt>. 
3950: 20 20 20 20 20 20 20 3c 64 64 3e 52 65 74 75 72         <dd>Retur
3960: 6e 73 20 74 68 65 20 6c 6f 63 61 6c 4e 61 6d 65  ns the localName
3970: 20 66 72 6f 6d 20 74 68 65 20 74 61 67 20 6e 61   from the tag na
3980: 6d 65 20 6f 66 20 74 68 65 20 67 69 76 65 6e 20  me of the given 
3990: 6e 6f 64 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20  node.</dd>.     
39a0: 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20   ..      .      
39b0: 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73      <dt>.<b clas
39c0: 73 3d 22 6d 65 74 68 6f 64 22 3e 73 65 6c 65 63  s="method">selec
39d0: 74 4e 6f 64 65 73 3c 2f 62 3e 20 3c 62 20 63 6c  tNodes</b> <b cl
39e0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 3f 2d 6e  ass="option">?-n
39f0: 61 6d 65 73 70 61 63 65 73 20 70 72 65 66 69 78  amespaces prefix
3a00: 55 72 69 4c 69 73 74 3f 3c 2f 62 3e 20 3c 62 20  UriList?</b> <b 
3a10: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 3f  class="option">?
3a20: 2d 63 61 63 68 65 20 26 6c 74 3b 62 6f 6f 6c 65  -cache &lt;boole
3a30: 61 6e 26 67 74 3b 3f 3c 2f 62 3e 20 3c 69 20 63  an&gt;?</b> <i c
3a40: 6c 61 73 73 3d 22 6d 22 3e 78 70 61 74 68 51 75  lass="m">xpathQu
3a50: 65 72 79 3c 2f 69 3e 20 3c 62 20 63 6c 61 73 73  ery</i> <b class
3a60: 3d 22 6f 70 74 69 6f 6e 22 3e 3f 74 79 70 65 56  ="option">?typeV
3a70: 61 72 3f 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a 20 20  ar?</b>.</dt>.  
3a80: 20 20 20 20 20 20 20 20 3c 64 64 3e 0a 3c 70 3e          <dd>.<p>
3a90: 52 65 74 75 72 6e 73 20 74 68 65 20 72 65 73 75  Returns the resu
3aa0: 6c 74 20 6f 66 20 61 70 70 6c 79 69 6e 67 20 74  lt of applying t
3ab0: 68 65 20 58 50 61 74 68 20 71 75 65 72 79 0a 3c  he XPath query.<
3ac0: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 78 70 61 74  i class="m">xpat
3ad0: 68 51 75 65 72 79 3c 2f 69 3e 20 74 6f 20 74 68  hQuery</i> to th
3ae0: 65 20 73 75 62 74 72 65 65 2e 20 54 68 69 73 20  e subtree. This 
3af0: 63 61 6e 20 62 65 20 61 0a 73 74 72 69 6e 67 2f  can be a.string/
3b00: 76 61 6c 75 65 2c 20 61 20 6c 69 73 74 20 6f 66  value, a list of
3b10: 20 73 74 72 69 6e 67 73 2c 20 61 20 6c 69 73 74   strings, a list
3b20: 20 6f 66 20 6e 6f 64 65 73 20 6f 72 20 61 20 6c   of nodes or a l
3b30: 69 73 74 0a 6f 66 20 61 74 74 72 69 62 75 74 65  ist.of attribute
3b40: 20 6e 61 6d 65 20 2f 20 76 61 6c 75 65 20 70 61   name / value pa
3b50: 69 72 73 2e 20 49 66 20 3c 69 20 63 6c 61 73 73  irs. If <i class
3b60: 3d 22 6d 22 3e 74 79 70 65 56 61 72 3c 2f 69 3e  ="m">typeVar</i>
3b70: 20 69 73 20 67 69 76 65 6e 0a 74 68 65 20 72 65   is given.the re
3b80: 73 75 6c 74 20 74 79 70 65 20 6e 61 6d 65 20 69  sult type name i
3b90: 73 20 73 74 6f 72 65 64 20 69 6e 74 6f 20 74 68  s stored into th
3ba0: 61 74 20 76 61 72 69 61 62 6c 65 20 28 65 6d 70  at variable (emp
3bb0: 74 79 2c 0a 62 6f 6f 6c 2c 20 6e 75 6d 62 65 72  ty,.bool, number
3bc0: 2c 20 73 74 72 69 6e 67 2c 20 6e 6f 64 65 73 2c  , string, nodes,
3bd0: 20 61 74 74 72 6e 6f 64 65 73 20 6f 72 20 6d 69   attrnodes or mi
3be0: 78 65 64 29 2e 3c 2f 70 3e 0a 0a 3c 70 3e 54 68  xed).</p>..<p>Th
3bf0: 65 20 61 72 67 75 6d 65 6e 74 20 3c 69 20 63 6c  e argument <i cl
3c00: 61 73 73 3d 22 6d 22 3e 78 70 61 74 68 51 75 65  ass="m">xpathQue
3c10: 72 79 3c 2f 69 3e 20 68 61 73 20 74 6f 20 62 65  ry</i> has to be
3c20: 20 61 20 76 61 6c 69 64 20 58 50 61 74 68 20 65   a valid XPath e
3c30: 78 70 72 65 73 73 69 6f 6e 2e 0a 48 6f 77 65 76  xpression..Howev
3c40: 65 72 20 74 68 65 72 65 20 61 72 65 20 61 20 66  er there are a f
3c50: 65 77 20 65 78 63 65 70 74 69 6f 6e 73 20 74 6f  ew exceptions to
3c60: 20 74 68 61 74 20 72 75 6c 65 2e 20 54 63 6c 20   that rule. Tcl 
3c70: 76 61 72 69 61 62 6c 65 0a 72 65 66 65 72 65 6e  variable.referen
3c80: 63 65 73 20 28 69 6e 20 74 68 65 20 75 73 75 61  ces (in the usua
3c90: 6c 20 74 63 6c 20 73 79 6e 74 61 78 3a 20 24 76  l tcl syntax: $v
3ca0: 61 72 6e 61 6d 65 29 20 6d 61 79 20 61 70 70 65  arname) may appe
3cb0: 61 72 20 69 6e 20 74 68 65 20 58 50 61 74 68 0a  ar in the XPath.
3cc0: 73 74 61 74 65 6d 65 6e 74 20 61 74 20 61 6e 79  statement at any
3cd0: 20 70 6f 73 69 74 69 6f 6e 20 77 68 65 72 65 20   position where 
3ce0: 69 74 20 69 73 20 6c 65 67 61 6c 20 61 63 63 6f  it is legal acco
3cf0: 72 64 69 6e 67 20 74 6f 20 74 68 65 20 72 75 6c  rding to the rul
3d00: 65 73 20 6f 66 0a 74 68 65 20 58 50 61 74 68 20  es of.the XPath 
3d10: 73 79 6e 74 61 78 20 74 6f 20 70 75 74 20 61 6e  syntax to put an
3d20: 20 58 50 61 74 68 20 76 61 72 69 61 62 6c 65 2e   XPath variable.
3d30: 20 49 67 6e 6f 72 69 6e 67 20 74 68 65 20 73 79   Ignoring the sy
3d40: 6e 74 61 78 20 72 75 6c 65 73 20 6f 66 0a 58 50  ntax rules of.XP
3d50: 61 74 68 20 74 68 65 20 54 63 6c 20 76 61 72 69  ath the Tcl vari
3d60: 61 62 6c 65 20 6e 61 6d 65 20 6d 61 79 20 62 65  able name may be
3d70: 20 61 6e 79 20 6c 65 67 61 6c 20 54 63 6c 20 76   any legal Tcl v
3d80: 61 72 20 6e 61 6d 65 3a 20 6c 6f 63 61 6c 0a 76  ar name: local.v
3d90: 61 72 69 61 62 6c 65 73 2c 20 67 6c 6f 62 61 6c  ariables, global
3da0: 20 76 61 72 69 61 62 6c 65 73 2c 20 61 72 72 61   variables, arra
3db0: 79 20 65 6e 74 72 69 65 73 20 61 6e 64 20 73 6f  y entries and so
3dc0: 20 6f 6e 2e 20 54 68 65 20 76 61 6c 75 65 20 77   on. The value w
3dd0: 69 6c 6c 0a 61 6c 77 61 79 73 20 62 65 20 73 65  ill.always be se
3de0: 65 6e 20 61 73 20 73 74 72 69 6e 67 20 6c 69 74  en as string lit
3df0: 65 72 61 6c 20 62 79 20 74 68 65 20 78 70 61 74  eral by the xpat
3e00: 68 20 65 6e 67 69 6e 65 2e 20 43 61 73 74 20 74  h engine. Cast t
3e10: 68 65 20 76 61 6c 75 65 0a 65 78 70 6c 69 63 69  he value.explici
3e20: 74 6c 79 20 77 69 74 68 20 74 68 65 20 61 63 63  tly with the acc
3e30: 6f 72 64 69 6e 67 20 78 70 61 74 68 20 66 75 6e  ording xpath fun
3e40: 63 74 69 6f 6e 73 20 28 6e 75 6d 62 65 72 28 29  ctions (number()
3e50: 2c 20 62 6f 6f 6c 65 61 6e 28 29 29 20 74 6f 0a  , boolean()) to.
3e60: 61 6e 6f 74 68 65 72 20 64 61 74 61 20 74 79 70  another data typ
3e70: 65 2c 20 69 66 20 6e 65 65 64 65 64 2e 3c 2f 70  e, if needed.</p
3e80: 3e 0a 0a 3c 70 3e 53 69 6d 69 6c 61 72 20 74 6f  >..<p>Similar to
3e90: 20 74 68 65 20 77 61 79 20 64 65 73 63 72 69 62   the way describ
3ea0: 65 64 20 61 62 6f 76 65 20 74 6f 20 69 6e 6a 65  ed above to inje
3eb0: 63 74 20 6c 69 74 65 72 61 6c 73 20 69 6e 20 61  ct literals in a
3ec0: 20 73 65 63 75 72 65 0a 77 61 79 20 69 6e 74 6f   secure.way into
3ed0: 20 74 68 65 20 58 50 61 74 68 20 65 78 70 72 65   the XPath expre
3ee0: 73 73 69 6f 6e 20 75 73 69 6e 67 20 74 63 6c 20  ssion using tcl 
3ef0: 76 61 72 69 61 62 6c 65 20 72 65 66 65 72 65 6e  variable referen
3f00: 63 65 73 20 74 68 65 72 65 20 69 73 20 61 0a 73  ces there is a.s
3f10: 79 6e 74 61 78 20 74 6f 20 69 6e 6a 65 63 74 20  yntax to inject 
3f20: 65 6c 65 6d 65 6e 74 20 6e 61 6d 65 73 20 66 72  element names fr
3f30: 6f 6d 20 74 63 6c 20 76 61 72 69 61 62 6c 65 73  om tcl variables
3f40: 2e 20 41 74 20 65 76 65 72 79 20 70 6c 61 63 65  . At every place
3f50: 0a 77 68 65 72 65 20 74 68 65 20 58 50 61 74 68  .where the XPath
3f60: 20 73 79 6e 74 61 78 20 61 6c 6c 6f 77 73 20 61   syntax allows a
3f70: 20 6e 6f 64 65 20 74 65 73 74 20 74 68 65 72 65   node test there
3f80: 20 63 6f 75 6c 64 20 62 65 20 61 20 74 63 6c 0a   could be a tcl.
3f90: 76 61 72 69 61 62 6c 65 20 72 65 66 65 72 65 6e  variable referen
3fa0: 63 65 20 28 69 6e 20 61 6e 79 20 66 6f 72 6d 29  ce (in any form)
3fb0: 2c 20 6a 75 73 74 20 74 68 65 20 6c 65 61 64 69  , just the leadi
3fc0: 6e 67 20 24 20 72 65 70 6c 61 63 65 64 20 77 69  ng $ replaced wi
3fd0: 74 68 20 25 2e 0a 54 68 69 73 20 61 6c 6c 6f 77  th %..This allow
3fe0: 73 20 6f 6e 65 20 74 6f 20 73 65 6c 65 63 74 20  s one to select 
3ff0: 6e 6f 64 65 73 20 77 69 74 68 20 27 73 74 72 61  nodes with 'stra
4000: 6e 67 65 27 20 28 69 6e 76 61 6c 69 64 2c 20 61  nge' (invalid, a
4010: 63 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 0a  ccording to the.
4020: 61 70 70 72 6f 70 72 69 61 74 65 20 58 4d 4c 20  appropriate XML 
4030: 70 72 6f 64 75 63 74 69 6f 6e 20 72 75 6c 65 29  production rule)
4040: 20 6e 6f 64 65 20 6e 61 6d 65 73 20 77 68 69 63   node names whic
4050: 68 20 6d 61 79 20 62 65 20 6e 65 65 64 65 64 20  h may be needed 
4060: 69 6e 0a 63 61 73 65 20 6f 66 20 77 6f 72 6b 69  in.case of worki
4070: 6e 67 20 77 69 74 68 20 4a 53 4f 4e 20 64 61 74  ng with JSON dat
4080: 61 2e 3c 2f 70 3e 0a 0a 3c 70 3e 54 68 65 20 6f  a.</p>..<p>The o
4090: 70 74 69 6f 6e 20 3c 69 20 63 6c 61 73 73 3d 22  ption <i class="
40a0: 6d 22 3e 2d 6e 61 6d 65 73 70 61 63 65 73 3c 2f  m">-namespaces</
40b0: 69 3e 20 65 78 70 65 63 74 73 20 61 20 74 63 6c  i> expects a tcl
40c0: 20 6c 69 73 74 20 77 69 74 68 20 70 72 65 66 69   list with prefi
40d0: 78 20 2f 0a 6e 61 6d 65 73 70 61 63 65 20 70 61  x /.namespace pa
40e0: 69 72 73 20 61 73 20 61 72 67 75 6d 65 6e 74 2e  irs as argument.
40f0: 20 49 66 20 74 68 69 73 20 6f 70 74 69 6f 6e 20   If this option 
4100: 69 73 20 6e 6f 74 20 67 69 76 65 6e 2c 20 74 68  is not given, th
4110: 65 6e 20 61 6e 79 0a 6e 61 6d 65 73 70 61 63 65  en any.namespace
4120: 20 70 72 65 66 69 78 20 77 69 74 68 69 6e 20 74   prefix within t
4130: 68 65 20 78 70 61 74 68 20 65 78 70 72 65 73 73  he xpath express
4140: 69 6f 6e 20 77 69 6c 6c 20 62 65 20 66 69 72 73  ion will be firs
4150: 74 20 72 65 73 6f 6c 76 65 64 0a 61 67 61 69 6e  t resolved.again
4160: 73 74 20 74 68 65 20 6c 69 73 74 20 6f 66 20 70  st the list of p
4170: 72 65 66 69 78 20 2f 20 6e 61 6d 65 73 70 61 63  refix / namespac
4180: 65 20 70 61 69 72 73 20 73 65 74 20 77 69 74 68  e pairs set with
4190: 20 74 68 65 0a 73 65 6c 65 63 74 4e 6f 64 65 73   the.selectNodes
41a0: 4e 61 6d 65 73 70 61 63 65 73 20 6d 65 74 68 6f  Namespaces metho
41b0: 64 20 66 6f 72 20 74 68 65 20 64 6f 63 75 6d 65  d for the docume
41c0: 6e 74 2c 20 74 68 65 20 6e 6f 64 65 20 62 65 6c  nt, the node bel
41d0: 6f 6e 67 73 20 74 6f 2e 20 49 66 0a 74 68 69 73  ongs to. If.this
41e0: 20 66 61 69 6c 73 2c 20 74 68 65 6e 20 74 68 65   fails, then the
41f0: 20 6e 61 6d 65 73 70 61 63 65 20 64 65 66 69 6e   namespace defin
4200: 69 74 69 6f 6e 73 20 69 6e 20 73 63 6f 70 65 20  itions in scope 
4210: 6f 66 20 74 68 65 20 63 6f 6e 74 65 78 74 0a 6e  of the context.n
4220: 6f 64 65 20 77 69 6c 6c 20 62 65 20 75 73 65 64  ode will be used
4230: 20 74 6f 20 72 65 73 6f 6c 76 65 20 74 68 65 20   to resolve the 
4240: 70 72 65 66 69 78 2e 20 49 66 20 74 68 69 73 20  prefix. If this 
4250: 6f 70 74 69 6f 6e 20 69 73 20 67 69 76 65 6e 2c  option is given,
4260: 20 61 6e 79 0a 6e 61 6d 65 73 70 61 63 65 20 70   any.namespace p
4270: 72 65 66 69 78 20 77 69 74 68 69 6e 20 74 68 65  refix within the
4280: 20 78 70 61 74 68 20 65 78 70 72 65 73 73 69 6f   xpath expressio
4290: 6e 20 77 69 6c 6c 20 62 65 20 66 69 72 73 74 20  n will be first 
42a0: 72 65 73 6f 6c 76 65 64 0a 61 67 61 69 6e 73 74  resolved.against
42b0: 20 74 68 61 74 20 67 69 76 65 6e 20 6c 69 73 74   that given list
42c0: 20 28 61 6e 64 20 69 67 6e 6f 72 69 6e 67 20 74   (and ignoring t
42d0: 68 65 20 64 6f 63 75 6d 65 6e 74 20 67 6c 6f 62  he document glob
42e0: 61 6c 20 70 72 65 66 69 78 20 2f 0a 6e 61 6d 65  al prefix /.name
42f0: 73 70 61 63 65 20 6c 69 73 74 29 2e 20 49 66 20  space list). If 
4300: 74 68 65 20 6c 69 73 74 20 62 69 6e 64 73 20 74  the list binds t
4310: 68 65 20 73 61 6d 65 20 70 72 65 66 69 78 20 74  he same prefix t
4320: 6f 20 64 69 66 66 65 72 65 6e 74 0a 6e 61 6d 65  o different.name
4330: 73 70 61 63 65 73 2c 20 74 68 65 6e 20 74 68 65  spaces, then the
4340: 20 66 69 72 73 74 20 62 69 6e 64 69 6e 67 20 77   first binding w
4350: 69 6c 6c 20 77 69 6e 2e 20 20 49 66 20 74 68 69  ill win.  If thi
4360: 73 20 66 61 69 6c 73 2c 20 74 68 65 6e 20 74 68  s fails, then th
4370: 65 0a 6e 61 6d 65 73 70 61 63 65 20 64 65 66 69  e.namespace defi
4380: 6e 69 74 69 6f 6e 73 20 69 6e 20 73 63 6f 70 65  nitions in scope
4390: 20 6f 66 20 74 68 65 20 63 6f 6e 74 65 78 74 20   of the context 
43a0: 6e 6f 64 65 20 77 69 6c 6c 20 62 65 20 75 73 65  node will be use
43b0: 64 20 74 6f 0a 72 65 73 6f 6c 76 65 20 74 68 65  d to.resolve the
43c0: 20 70 72 65 66 69 78 2c 20 61 73 20 75 73 75 61   prefix, as usua
43d0: 6c 2e 3c 2f 70 3e 0a 0a 3c 70 3e 49 66 20 74 68  l.</p>..<p>If th
43e0: 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 2d  e <i class="m">-
43f0: 63 61 63 68 65 3c 2f 69 3e 20 6f 70 74 69 6f 6e  cache</i> option
4400: 20 69 73 20 75 73 65 64 20 77 69 74 68 20 61 20   is used with a 
4410: 74 72 75 65 20 76 61 6c 75 65 2c 20 74 68 65 6e  true value, then
4420: 20 74 68 65 0a 3c 69 20 63 6c 61 73 73 3d 22 6d   the.<i class="m
4430: 22 3e 78 70 61 74 68 51 75 65 72 79 3c 2f 69 3e  ">xpathQuery</i>
4440: 20 77 69 6c 6c 20 62 65 20 6c 6f 6f 6b 65 64 20   will be looked 
4450: 75 70 20 69 6e 20 61 20 64 6f 63 75 6d 65 6e 74  up in a document
4460: 20 73 70 65 63 69 66 69 63 20 63 61 63 68 65 2e   specific cache.
4470: 20 49 66 0a 74 68 65 20 71 75 65 72 79 20 69 73   If.the query is
4480: 20 66 6f 75 6e 64 2c 20 74 68 65 6e 20 74 68 65   found, then the
4490: 20 73 74 6f 72 65 64 20 70 72 65 2d 63 6f 6d 70   stored pre-comp
44a0: 69 6c 65 64 20 71 75 65 72 79 20 77 69 6c 6c 20  iled query will 
44b0: 62 65 20 75 73 65 64 2e 0a 49 66 20 74 68 65 20  be used..If the 
44c0: 71 75 65 72 79 20 69 73 6e 27 74 20 66 6f 75 6e  query isn't foun
44d0: 64 2c 20 69 74 20 77 69 6c 6c 20 62 65 20 63 6f  d, it will be co
44e0: 6d 70 69 6c 65 64 20 61 6e 64 20 73 74 6f 72 65  mpiled and store
44f0: 64 20 69 6e 20 74 68 65 20 63 61 63 68 65 2c 0a  d in the cache,.
4500: 66 6f 72 20 75 73 65 20 69 6e 20 66 75 72 74 68  for use in furth
4510: 65 72 20 63 61 6c 6c 73 2e 20 50 6c 65 61 73 65  er calls. Please
4520: 20 6e 6f 74 65 20 74 68 61 74 20 74 68 65 20 3c   note that the <
4530: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 78 70 61 74  i class="m">xpat
4540: 68 51 75 65 72 79 3c 2f 69 3e 20 0a 67 69 76 65  hQuery</i> .give
4550: 6e 20 61 73 20 73 74 72 69 6e 67 20 69 73 20 75  n as string is u
4560: 73 65 64 20 61 73 20 6b 65 79 20 66 6f 72 20 74  sed as key for t
4570: 68 65 20 63 61 63 68 65 2e 20 54 68 69 73 20 6d  he cache. This m
4580: 65 61 6e 73 2c 20 74 68 61 74 20 65 71 75 61 6c  eans, that equal
4590: 0a 58 50 61 74 68 20 65 78 70 72 65 73 73 69 6f  .XPath expressio
45a0: 6e 73 2c 20 77 68 69 63 68 20 64 69 66 66 65 72  ns, which differ
45b0: 20 6f 6e 6c 79 20 69 6e 20 77 68 69 74 65 20 73   only in white s
45c0: 70 61 63 65 20 61 72 65 20 74 72 65 61 74 65 64  pace are treated
45d0: 20 61 73 0a 64 69 66 66 65 72 65 6e 74 20 63 61   as.different ca
45e0: 63 68 65 20 65 6e 74 72 69 65 73 2e 20 53 70 65  che entries. Spe
45f0: 63 69 61 6c 20 63 61 72 65 20 69 73 20 6e 65 65  cial care is nee
4600: 64 65 64 2c 20 69 66 20 74 68 65 20 58 50 61 74  ded, if the XPat
4610: 68 0a 65 78 70 72 65 73 73 69 6f 6e 20 69 6e 63  h.expression inc
4620: 6c 75 64 65 73 20 6e 61 6d 65 73 70 61 63 65 20  ludes namespace 
4630: 70 72 65 66 69 78 65 73 20 6f 72 20 72 65 66 65  prefixes or refe
4640: 72 65 6e 63 65 73 20 74 6f 20 74 63 6c 20 76 61  rences to tcl va
4650: 72 69 61 62 6c 65 73 2e 0a 42 6f 74 68 20 6e 61  riables..Both na
4660: 6d 65 73 70 61 63 65 20 70 72 65 66 69 78 65 73  mespace prefixes
4670: 20 61 6e 64 20 74 63 6c 20 76 61 72 69 61 62 6c   and tcl variabl
4680: 65 20 72 65 66 65 72 65 6e 63 65 73 20 77 69 6c  e references wil
4690: 6c 20 62 65 20 72 65 73 6f 6c 76 65 64 0a 61 63  l be resolved.ac
46a0: 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20 58  cording to the X
46b0: 4d 4c 20 70 72 65 66 69 78 20 6e 61 6d 65 73 70  ML prefix namesp
46c0: 61 63 65 20 6d 61 70 70 69 6e 67 73 20 61 6e 64  ace mappings and
46d0: 20 74 63 6c 20 76 61 72 69 61 62 6c 65 20 76 61   tcl variable va
46e0: 6c 75 65 73 0a 61 74 20 65 78 70 72 65 73 73 69  lues.at expressi
46f0: 6f 6e 20 63 6f 6d 70 69 6c 61 74 69 6f 6e 20 74  on compilation t
4700: 69 6d 65 2e 20 49 66 20 74 68 65 20 73 61 6d 65  ime. If the same
4710: 20 58 50 61 74 68 20 65 78 70 72 65 73 73 69 6f   XPath expressio
4720: 6e 20 69 73 20 75 73 65 64 0a 6c 61 74 65 72 20  n is used.later 
4730: 6f 6e 20 69 6e 20 61 20 63 6f 6e 74 65 78 74 20  on in a context 
4740: 77 69 74 68 20 6f 74 68 65 72 20 58 4d 4c 20 70  with other XML p
4750: 72 65 66 69 78 20 6e 61 6d 65 73 70 61 63 65 20  refix namespace 
4760: 6d 61 70 70 69 6e 67 73 20 6f 72 0a 76 61 6c 75  mappings or.valu
4770: 65 73 20 6f 66 20 74 68 65 20 75 73 65 64 20 74  es of the used t
4780: 63 6c 20 76 61 72 69 61 62 6c 65 73 2c 20 6d 61  cl variables, ma
4790: 6b 65 20 73 75 72 65 20 74 6f 20 66 69 72 73 74  ke sure to first
47a0: 20 72 65 6d 6f 76 65 20 74 68 65 0a 63 6f 6d 70   remove the.comp
47b0: 69 6c 65 64 20 65 78 70 72 65 73 73 69 6f 6e 20  iled expression 
47c0: 66 72 6f 6d 20 74 68 65 20 63 61 63 68 65 20 77  from the cache w
47d0: 69 74 68 20 74 68 65 20 68 65 6c 70 20 6f 66 20  ith the help of 
47e0: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65  the.<b class="me
47f0: 74 68 6f 64 22 3e 64 65 6c 65 74 65 58 50 61 74  thod">deleteXPat
4800: 68 43 61 63 68 65 3c 2f 62 3e 20 6d 65 74 68 6f  hCache</b> metho
4810: 64 2c 20 74 6f 20 66 6f 72 63 65 20 61 20 72 65  d, to force a re
4820: 63 6f 6d 70 69 6c 61 74 69 6f 6e 2e 0a 57 69 74  compilation..Wit
4830: 68 6f 75 74 20 75 73 69 6e 67 20 74 68 65 20 3c  hout using the <
4840: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 2d 63 61 63  i class="m">-cac
4850: 68 65 3c 2f 69 3e 20 6f 70 74 69 6f 6e 20 73 75  he</i> option su
4860: 63 68 20 63 6f 6e 73 69 64 65 72 61 74 69 6f 6e  ch consideration
4870: 20 69 73 20 6e 65 76 65 72 0a 6e 65 65 64 65 64   is never.needed
4880: 2e 3c 2f 70 3e 0a 0a 3c 70 3e 45 78 61 6d 70 6c  .</p>..<p>Exampl
4890: 65 73 3a 3c 2f 70 3e 0a 20 20 20 20 20 20 20 20  es:</p>.        
48a0: 20 20 3c 70 72 65 20 63 6c 61 73 73 3d 22 65 78    <pre class="ex
48b0: 61 6d 70 6c 65 22 3e 73 65 74 20 70 61 72 61 67  ample">set parag
48c0: 72 61 70 68 4e 6f 64 65 73 20 5b 24 6e 6f 64 65  raphNodes [$node
48d0: 20 73 65 6c 65 63 74 4e 6f 64 65 73 20 7b 63 68   selectNodes {ch
48e0: 61 70 74 65 72 5b 33 5d 2f 2f 70 61 72 61 5b 40  apter[3]//para[@
48f0: 74 79 70 65 3d 27 77 61 72 6e 69 6e 67 27 20 6f  type='warning' o
4900: 72 20 40 74 79 70 65 3d 27 65 72 72 6f 72 27 7d  r @type='error'}
4910: 20 5d 0a 66 6f 72 65 61 63 68 20 70 61 72 61 67   ].foreach parag
4920: 72 61 70 68 20 24 70 61 72 61 67 72 61 70 68 4e  raph $paragraphN
4930: 6f 64 65 73 20 7b 0a 20 20 20 20 6c 61 70 70 65  odes {.    lappe
4940: 6e 64 20 20 76 61 6c 75 65 73 20 5b 24 70 61 72  nd  values [$par
4950: 61 67 72 61 70 68 20 73 65 6c 65 63 74 4e 6f 64  agraph selectNod
4960: 65 73 20 61 74 74 72 69 62 75 74 65 3a 3a 74 79  es attribute::ty
4970: 70 65 5d 0a 7d 0a 0a 73 65 74 20 64 6f 63 20 5b  pe].}..set doc [
4980: 64 6f 6d 20 70 61 72 73 65 20 7b 26 6c 74 3b 64  dom parse {&lt;d
4990: 6f 63 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f  oc xmlns="http:/
49a0: 2f 77 77 77 2e 64 65 66 61 75 6c 74 6e 61 6d 65  /www.defaultname
49b0: 73 70 61 63 65 2e 6f 72 67 22 26 67 74 3b 26 6c  space.org"&gt;&l
49c0: 74 3b 63 68 69 6c 64 2f 26 67 74 3b 26 6c 74 3b  t;child/&gt;&lt;
49d0: 2f 64 6f 63 26 67 74 3b 7d 5d 0a 73 65 74 20 72  /doc&gt;}].set r
49e0: 6f 6f 74 20 5b 24 64 6f 63 20 64 6f 63 75 6d 65  oot [$doc docume
49f0: 6e 74 45 6c 65 6d 65 6e 74 5d 0a 73 65 74 20 63  ntElement].set c
4a00: 68 69 6c 64 4e 6f 64 65 73 20 5b 24 72 6f 6f 74  hildNodes [$root
4a10: 20 73 65 6c 65 63 74 4e 6f 64 65 73 20 2d 6e 61   selectNodes -na
4a20: 6d 65 73 70 61 63 65 73 20 7b 64 65 66 61 75 6c  mespaces {defaul
4a30: 74 20 68 74 74 70 3a 2f 2f 77 77 77 2e 64 65 66  t http://www.def
4a40: 61 75 6c 74 6e 61 6d 65 73 70 61 63 65 2e 6f 72  aultnamespace.or
4a50: 67 7d 20 64 65 66 61 75 6c 74 3a 63 68 69 6c 64  g} default:child
4a60: 5d 3c 2f 70 72 65 3e 0a 0a 20 20 20 20 20 20 20  ]</pre>..       
4a70: 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a     </dd>.      .
4a80: 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20  .      .        
4a90: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65  <dt><b class="me
4aa0: 74 68 6f 64 22 3e 67 65 74 4c 69 6e 65 3c 2f 62  thod">getLine</b
4ab0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
4ac0: 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 6c  dd>Returns the l
4ad0: 69 6e 65 20 6e 75 6d 62 65 72 20 6f 66 20 74 68  ine number of th
4ae0: 61 74 20 6e 6f 64 65 20 69 6e 20 74 68 65 20 6f  at node in the o
4af0: 72 69 67 69 6e 61 6c 6c 79 20 70 61 72 73 65 64  riginally parsed
4b00: 0a 58 4d 4c 2e 3c 2f 64 64 3e 0a 20 20 20 20 20  .XML.</dd>.     
4b10: 20 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 0a   .      .      .
4b20: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 62 20 63          <dt><b c
4b30: 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 67 65  lass="method">ge
4b40: 74 43 6f 6c 75 6d 6e 3c 2f 62 3e 3c 2f 64 74 3e  tColumn</b></dt>
4b50: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 74  .        <dd>Ret
4b60: 75 72 6e 73 20 74 68 65 20 63 6f 6c 75 6d 6e 20  urns the column 
4b70: 6e 75 6d 62 65 72 20 6f 66 20 74 68 61 74 20 6e  number of that n
4b80: 6f 64 65 20 69 6e 20 74 68 65 20 6f 72 69 67 69  ode in the origi
4b90: 6e 61 6c 6c 79 20 70 61 72 73 65 64 0a 58 4d 4c  nally parsed.XML
4ba0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20  .</dd>.      .. 
4bb0: 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64       .        <d
4bc0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68  t><b class="meth
4bd0: 6f 64 22 3e 61 73 4c 69 73 74 3c 2f 62 3e 3c 2f  od">asList</b></
4be0: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
4bf0: 52 65 74 75 72 6e 73 20 74 68 65 20 44 4f 4d 20  Returns the DOM 
4c00: 73 75 62 73 74 72 65 65 20 73 74 61 72 74 69 6e  substree startin
4c10: 67 20 66 6f 72 6d 20 74 68 65 20 63 75 72 72 65  g form the curre
4c20: 6e 74 20 6e 6f 64 65 20 61 73 20 61 0a 6e 65 73  nt node as a.nes
4c30: 74 65 64 20 54 63 6c 20 6c 69 73 74 2e 3c 2f 64  ted Tcl list.</d
4c40: 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20 20 20  d>.      ..     
4c50: 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c   .        <dt>.<
4c60: 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22  b class="method"
4c70: 3e 61 73 58 4d 4c 3c 2f 62 3e 20 3c 62 20 63 6c  >asXML</b> <b cl
4c80: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 3f 2d 69  ass="option">?-i
4c90: 6e 64 65 6e 74 20 6e 6f 6e 65 2f 31 2e 2e 38 3f  ndent none/1..8?
4ca0: 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f  </b> <b class="o
4cb0: 70 74 69 6f 6e 22 3e 3f 2d 63 68 61 6e 6e 65 6c  ption">?-channel
4cc0: 20 63 68 61 6e 6e 65 6c 49 64 3f 3c 2f 62 3e 20   channelId?</b> 
4cd0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
4ce0: 22 3e 3f 2d 65 73 63 61 70 65 4e 6f 6e 41 53 43  ">?-escapeNonASC
4cf0: 49 49 3f 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73  II?</b> <b class
4d00: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 78 6d 6c 44 65  ="option">-xmlDe
4d10: 63 6c 61 72 61 74 69 6f 6e 20 26 6c 74 3b 62 6f  claration &lt;bo
4d20: 6f 6c 65 61 6e 26 67 74 3b 3f 3c 2f 62 3e 20 3c  olean&gt;?</b> <
4d30: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4d40: 3e 2d 65 6e 63 53 74 72 69 6e 67 20 26 6c 74 3b  >-encString &lt;
4d50: 73 74 72 69 6e 67 26 67 74 3b 3c 2f 62 3e 20 3c  string&gt;</b> <
4d60: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4d70: 3e 3f 2d 65 73 63 61 70 65 41 6c 6c 51 75 6f 74  >?-escapeAllQuot
4d80: 3f 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22  ?</b> <b class="
4d90: 6f 70 74 69 6f 6e 22 3e 3f 2d 69 6e 64 65 6e 74  option">?-indent
4da0: 41 74 74 72 73 3f 3c 2f 62 3e 20 3c 62 20 63 6c  Attrs?</b> <b cl
4db0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 3f 2d 6e  ass="option">?-n
4dc0: 6f 67 74 65 73 63 61 70 65 3f 3c 2f 62 3e 20 3c  ogtescape?</b> <
4dd0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4de0: 3e 3f 2d 6e 6f 45 6d 70 74 79 45 6c 65 6d 65 6e  >?-noEmptyElemen
4df0: 74 54 61 67 3f 3c 2f 62 3e 0a 3c 2f 64 74 3e 0a  tTag?</b>.</dt>.
4e00: 20 20 20 20 20 20 20 20 3c 64 64 3e 0a 3c 70 3e          <dd>.<p>
4e10: 52 65 74 75 72 6e 73 20 74 68 65 20 44 4f 4d 20  Returns the DOM 
4e20: 73 75 62 73 74 72 65 65 20 73 74 61 72 74 69 6e  substree startin
4e30: 67 20 66 72 6f 6d 20 74 68 65 20 63 75 72 72 65  g from the curre
4e40: 6e 74 0a 20 20 20 20 20 20 20 20 6e 6f 64 65 20  nt.        node 
4e50: 61 73 20 74 68 65 20 72 6f 6f 74 20 6e 6f 64 65  as the root node
4e60: 20 6f 66 20 74 68 65 20 72 65 73 75 6c 74 20 61   of the result a
4e70: 73 20 61 6e 20 28 6f 70 74 69 6f 6e 61 6c 20 69  s an (optional i
4e80: 6e 64 65 6e 74 65 64 29 0a 20 20 20 20 20 20 20  ndented).       
4e90: 20 58 4d 4c 20 73 74 72 69 6e 67 20 6f 72 20 73   XML string or s
4ea0: 65 6e 64 73 20 74 68 65 20 6f 75 74 70 75 74 20  ends the output 
4eb0: 64 69 72 65 63 74 6c 79 20 74 6f 20 74 68 65 20  directly to the 
4ec0: 67 69 76 65 6e 0a 20 20 20 20 20 20 20 20 63 68  given.        ch
4ed0: 61 6e 6e 65 6c 49 64 2e 3c 2f 70 3e 0a 0a 20 20  annelId.</p>..  
4ee0: 20 20 20 20 20 20 3c 70 3e 49 66 20 74 68 65 20        <p>If the 
4ef0: 6f 70 74 69 6f 6e 20 3c 69 20 63 6c 61 73 73 3d  option <i class=
4f00: 22 6d 22 3e 2d 65 73 63 61 70 65 4e 6f 6e 41 53  "m">-escapeNonAS
4f10: 43 49 49 3c 2f 69 3e 20 69 73 20 67 69 76 65 6e  CII</i> is given
4f20: 2c 0a 20 20 20 20 20 20 20 20 65 76 65 72 79 20  ,.        every 
4f30: 6e 6f 6e 20 37 20 62 69 74 20 41 53 43 49 49 20  non 7 bit ASCII 
4f40: 63 68 61 72 61 63 74 65 72 20 69 6e 20 61 74 74  character in att
4f50: 72 69 62 75 74 65 20 76 61 6c 75 65 73 20 6f 72  ribute values or
4f60: 20 65 6c 65 6d 65 6e 74 0a 20 20 20 20 20 20 20   element.       
4f70: 20 50 43 44 41 54 41 20 63 6f 6e 74 65 6e 74 20   PCDATA content 
4f80: 77 69 6c 6c 20 62 65 20 65 73 63 61 70 65 64 20  will be escaped 
4f90: 61 73 20 63 68 61 72 61 63 74 65 72 20 72 65 66  as character ref
4fa0: 65 72 65 6e 63 65 20 69 6e 0a 20 20 20 20 20 20  erence in.      
4fb0: 20 20 64 65 63 69 6d 61 6c 20 72 65 70 72 65 73    decimal repres
4fc0: 65 6e 74 61 74 69 6f 6e 2e 3c 2f 70 3e 0a 0a 20  entation.</p>.. 
4fd0: 20 20 20 20 20 20 20 3c 70 3e 54 68 65 20 66 6c         <p>The fl
4fe0: 61 67 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  ag <i class="m">
4ff0: 2d 78 6d 6c 44 65 63 6c 61 72 61 74 69 6f 6e 3c  -xmlDeclaration<
5000: 2f 69 3e 20 64 65 74 65 72 6d 69 6e 65 73 20 77  /i> determines w
5010: 68 65 74 68 65 72 20 74 68 65 72 65 0a 20 20 20  hether there.   
5020: 20 20 20 20 20 77 69 6c 6c 20 62 65 20 61 6e 20       will be an 
5030: 58 4d 4c 20 44 65 63 6c 61 72 61 74 69 6f 6e 20  XML Declaration 
5040: 61 6e 64 20 61 20 6e 65 77 6c 69 6e 65 20 65 6d  and a newline em
5050: 69 74 74 65 64 20 62 65 66 6f 72 65 0a 20 20 20  itted before.   
5060: 20 20 20 20 20 61 6e 79 74 68 69 6e 67 20 65 6c       anything el
5070: 73 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  se. The default 
5080: 69 73 2c 20 74 6f 20 64 6f 20 6e 6f 74 2e 20 49  is, to do not. I
5090: 66 20 74 68 69 73 20 66 6c 61 67 20 69 73 0a 20  f this flag is. 
50a0: 20 20 20 20 20 20 20 67 69 76 65 6e 20 77 69 74         given wit
50b0: 68 20 61 20 74 72 75 65 20 61 72 67 75 6d 65 6e  h a true argumen
50c0: 74 20 74 68 65 6e 3c 2f 70 3e 0a 0a 20 20 20 20  t then</p>..    
50d0: 20 20 20 20 3c 70 3e 0a 3c 69 20 63 6c 61 73 73      <p>.<i class
50e0: 3d 22 6d 22 3e 2d 65 6e 63 53 74 72 69 6e 67 3c  ="m">-encString<
50f0: 2f 69 3e 20 73 65 74 73 20 74 68 65 20 65 6e 63  /i> sets the enc
5100: 6f 64 69 6e 67 20 76 61 6c 75 65 20 69 6e 20 74  oding value in t
5110: 68 65 20 58 4d 4c 0a 20 20 20 20 20 20 20 20 44  he XML.        D
5120: 65 63 6c 61 72 61 74 69 6f 6e 2e 20 4f 74 68 65  eclaration. Othe
5130: 72 77 69 73 65 2c 20 74 68 69 73 20 6f 70 74 69  rwise, this opti
5140: 6f 6e 20 69 73 20 69 67 6e 6f 72 65 64 2e 20 50  on is ignored. P
5150: 6c 65 61 73 65 20 6e 6f 74 65 2c 0a 20 20 20 20  lease note,.    
5160: 20 20 20 20 74 68 61 74 20 74 68 69 73 20 6f 70      that this op
5170: 74 69 6f 6e 20 6a 75 73 74 20 65 6e 68 61 6e 63  tion just enhanc
5180: 65 20 74 68 65 20 73 74 72 69 6e 67 20 72 65 70  e the string rep
5190: 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 74  resentation of t
51a0: 68 65 0a 20 20 20 20 20 20 20 20 67 65 6e 65 72  he.        gener
51b0: 61 74 65 64 20 58 4d 4c 20 44 65 63 6c 61 72 61  ated XML Declara
51c0: 74 69 6f 6e 20 77 69 74 68 20 61 6e 20 65 6e 63  tion with an enc
51d0: 6f 64 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f  oding informatio
51e0: 6e 20 73 74 72 69 6e 67 2c 0a 20 20 20 20 20 20  n string,.      
51f0: 20 20 6e 6f 74 68 69 6e 67 20 6d 6f 72 65 2e 20    nothing more. 
5200: 49 74 27 73 20 75 70 20 74 6f 20 74 68 65 20 75  It's up to the u
5210: 73 65 72 20 74 6f 20 68 61 6e 64 6c 65 20 65 6e  ser to handle en
5220: 63 6f 64 69 6e 67 20 69 6e 20 63 61 73 65 0a 20  coding in case. 
5230: 20 20 20 20 20 20 20 6f 66 20 77 72 69 74 69 6e         of writin
5240: 67 20 74 6f 20 61 20 63 68 61 6e 6e 65 6c 20 6f  g to a channel o
5250: 72 20 72 65 70 61 72 73 69 6e 67 2e 3c 2f 70 3e  r reparsing.</p>
5260: 0a 20 20 20 20 20 20 20 20 20 20 20 20 0a 20 20  .            .  
5270: 20 20 20 20 20 20 3c 70 3e 49 66 20 74 68 65 20        <p>If the 
5280: 6f 70 74 69 6f 6e 20 3c 69 20 63 6c 61 73 73 3d  option <i class=
5290: 22 6d 22 3e 2d 65 73 63 61 70 65 41 6c 6c 51 75  "m">-escapeAllQu
52a0: 6f 74 3c 2f 69 3e 20 69 73 20 67 69 76 65 6e 2c  ot</i> is given,
52b0: 0a 20 20 20 20 20 20 20 20 71 75 6f 74 61 74 69  .        quotati
52c0: 6f 6e 20 6d 61 72 6b 73 20 77 69 6c 6c 20 62 65  on marks will be
52d0: 20 65 73 63 61 70 65 64 20 77 69 74 68 20 26 61   escaped with &a
52e0: 6d 70 3b 71 75 6f 74 3b 20 65 76 65 6e 20 69 6e  mp;quot; even in
52f0: 20 74 65 78 74 0a 20 20 20 20 20 20 20 20 63 6f   text.        co
5300: 6e 74 65 6e 74 20 6f 66 20 65 6c 65 6d 65 6e 74  ntent of element
5310: 73 2e 3c 2f 70 3e 0a 0a 20 20 20 20 20 20 20 20  s.</p>..        
5320: 3c 70 3e 49 66 20 74 68 65 20 6f 70 74 69 6f 6e  <p>If the option
5330: 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 2d 69   <i class="m">-i
5340: 6e 64 65 6e 74 41 74 74 72 73 3c 2f 69 3e 20 69  ndentAttrs</i> i
5350: 73 0a 20 20 20 20 20 20 20 20 67 69 76 65 6e 2c  s.        given,
5360: 20 74 68 65 6e 20 61 74 74 72 69 62 75 74 65 73   then attributes
5370: 20 77 69 6c 6c 20 65 61 63 68 20 62 65 20 73 65   will each be se
5380: 70 61 72 61 74 65 64 20 77 69 74 68 20 6e 65 77  parated with new
5390: 6c 69 6e 65 73 0a 20 20 20 20 20 20 20 20 61 6e  lines.        an
53a0: 64 20 69 6e 64 65 6e 74 65 64 20 74 6f 20 74 68  d indented to th
53b0: 65 20 73 61 6d 65 20 6c 65 76 65 6c 20 61 73 20  e same level as 
53c0: 74 68 65 20 70 61 72 65 6e 74 20 6e 6f 64 65 20  the parent node 
53d0: 70 6c 75 73 20 74 68 65 0a 20 20 20 20 20 20 20  plus the.       
53e0: 20 76 61 6c 75 65 20 67 69 76 65 6e 20 61 73 20   value given as 
53f0: 61 72 67 75 6d 65 6e 74 20 74 6f 20 3c 69 20 63  argument to <i c
5400: 6c 61 73 73 3d 22 6d 22 3e 2d 69 6e 64 65 6e 74  lass="m">-indent
5410: 41 74 74 72 73 3c 2f 69 3e 20 28 30 2e 2e 38 29  Attrs</i> (0..8)
5420: 2e 3c 2f 70 3e 0a 0a 20 20 20 20 20 20 20 20 3c  .</p>..        <
5430: 70 3e 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 20  p>If the option 
5440: 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 2d 6e 6f  <i class="m">-no
5450: 67 74 65 73 63 61 70 65 3c 2f 69 3e 20 69 73 20  gtescape</i> is 
5460: 67 69 76 65 6e 20 74 68 65 6e 20 74 68 65 0a 20  given then the. 
5470: 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72         character
5480: 20 27 26 67 74 3b 27 20 77 6f 6e 27 74 20 67 65   '&gt;' won't ge
5490: 74 20 65 73 63 61 70 65 64 20 69 6e 20 61 74 74  t escaped in att
54a0: 72 69 62 75 74 65 20 76 61 6c 75 65 73 20 61 6e  ribute values an
54b0: 64 20 74 65 78 74 0a 20 20 20 20 20 20 20 20 63  d text.        c
54c0: 6f 6e 74 65 6e 74 20 6f 66 20 65 6c 65 6d 65 6e  ontent of elemen
54d0: 74 73 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  ts. The default 
54e0: 69 73 20 74 6f 20 65 73 63 61 70 65 20 74 68 69  is to escape thi
54f0: 73 0a 20 20 20 20 20 20 20 20 63 68 61 72 61 63  s.        charac
5500: 74 65 72 2e 3c 2f 70 3e 0a 0a 20 20 20 20 20 20  ter.</p>..      
5510: 20 20 3c 70 3e 49 66 20 74 68 65 20 6f 70 74 69    <p>If the opti
5520: 6f 6e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  on <i class="m">
5530: 2d 6e 6f 45 6d 70 74 79 45 6c 65 6d 65 6e 74 54  -noEmptyElementT
5540: 61 67 3c 2f 69 3e 20 69 73 20 67 69 76 65 6e 20  ag</i> is given 
5550: 74 68 65 6e 20 6e 6f 0a 20 20 20 20 20 20 20 20  then no.        
5560: 65 6d 70 74 79 20 74 61 67 20 73 79 6e 74 61 78  empty tag syntax
5570: 20 77 69 6c 6c 20 62 65 20 75 73 65 64 2e 20 49   will be used. I
5580: 6e 73 74 65 61 64 2c 20 69 66 20 61 6e 20 65 6c  nstead, if an el
5590: 65 6d 65 6e 74 20 68 61 73 0a 20 20 20 20 20 20  ement has.      
55a0: 20 20 65 6d 70 74 79 20 63 6f 6e 74 65 6e 74 20    empty content 
55b0: 69 74 20 77 69 6c 6c 20 62 65 20 73 65 72 69 61  it will be seria
55c0: 6c 69 7a 65 64 20 77 69 74 68 20 61 6e 20 65 6c  lized with an el
55d0: 65 6d 65 6e 74 20 73 74 61 72 74 20 74 61 67 0a  ement start tag.
55e0: 20 20 20 20 20 20 20 20 61 6e 64 20 61 6e 20 69          and an i
55f0: 6d 6d 65 64 69 61 74 65 6c 79 20 66 6f 6c 6c 6f  mmediately follo
5600: 77 69 6e 67 20 65 6c 65 6d 65 6e 74 20 65 6e 64  wing element end
5610: 20 74 61 67 2e 3c 2f 70 3e 0a 3c 2f 64 64 3e 0a   tag.</p>.</dd>.
5620: 0a 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20 0a  .      ..      .
5630: 20 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62 20          <dt>.<b 
5640: 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e 61  class="method">a
5650: 73 48 54 4d 4c 3c 2f 62 3e 20 3c 62 20 63 6c 61  sHTML</b> <b cla
5660: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 3f 2d 63 68  ss="option">?-ch
5670: 61 6e 6e 65 6c 20 63 68 61 6e 6e 65 6c 49 64 3f  annel channelId?
5680: 3c 2f 62 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6f  </b>.<b class="o
5690: 70 74 69 6f 6e 22 3e 3f 2d 65 73 63 61 70 65 4e  ption">?-escapeN
56a0: 6f 6e 41 53 43 49 49 3f 3c 2f 62 3e 20 20 3c 62  onASCII?</b>  <b
56b0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
56c0: 3f 2d 68 74 6d 6c 45 6e 74 69 74 69 65 73 3f 3c  ?-htmlEntities?<
56d0: 2f 62 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /b>.</dt>.      
56e0: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68    <dd>Returns th
56f0: 65 20 44 4f 4d 20 73 75 62 73 74 72 65 65 20 73  e DOM substree s
5700: 74 61 72 74 69 6e 67 20 66 72 6f 6d 20 74 68 65  tarting from the
5710: 20 63 75 72 72 65 6e 74 20 6e 6f 64 65 20 61 73   current node as
5720: 20 74 68 65 0a 72 6f 6f 74 20 6e 6f 64 65 20 6f   the.root node o
5730: 66 20 74 68 65 20 72 65 73 75 6c 74 20 73 65 72  f the result ser
5740: 69 61 6c 69 7a 65 64 20 61 63 63 6f 72 64 69 6e  ialized accordin
5750: 67 20 74 6f 20 48 54 4d 4c 20 72 75 6c 65 73 20  g to HTML rules 
5760: 28 48 54 4d 4c 20 65 6c 65 6d 65 6e 74 73 20 61  (HTML elements a
5770: 72 65 0a 72 65 63 6f 67 6e 69 7a 65 64 20 72 65  re.recognized re
5780: 67 61 72 64 6c 65 73 73 20 6f 66 20 63 61 73 65  gardless of case
5790: 2c 20 77 69 74 68 6f 75 74 20 65 6e 64 20 74 61  , without end ta
57a0: 67 73 20 66 6f 72 20 65 6d 70 74 79 20 48 54 4d  gs for empty HTM
57b0: 4c 20 65 6c 65 6d 65 6e 74 73 20 65 74 63 2e 29  L elements etc.)
57c0: 2c 0a 61 73 20 73 74 72 69 6e 67 20 6f 72 20 73  ,.as string or s
57d0: 65 6e 64 73 20 74 68 65 20 6f 75 74 70 75 74 20  ends the output 
57e0: 64 69 72 65 63 74 6c 79 20 74 6f 20 74 68 65 20  directly to the 
57f0: 67 69 76 65 6e 20 63 68 61 6e 6e 65 6c 49 64 2e  given channelId.
5800: 20 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 0a 3c   If the option.<
5810: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 2d 65 73 63  i class="m">-esc
5820: 61 70 65 4e 6f 6e 41 53 43 49 49 3c 2f 69 3e 20  apeNonASCII</i> 
5830: 69 73 20 67 69 76 65 6e 2c 20 65 76 65 72 79 20  is given, every 
5840: 6e 6f 6e 20 37 20 62 69 74 20 41 53 43 49 49 20  non 7 bit ASCII 
5850: 63 68 61 72 61 63 74 65 72 20 69 6e 20 61 74 74  character in att
5860: 72 69 62 75 74 65 0a 76 61 6c 75 65 73 20 6f 72  ribute.values or
5870: 20 65 6c 65 6d 65 6e 74 20 50 43 44 41 54 41 20   element PCDATA 
5880: 63 6f 6e 74 65 6e 74 20 77 69 6c 6c 20 62 65 20  content will be 
5890: 65 73 63 61 70 65 64 20 61 73 20 63 68 61 72 61  escaped as chara
58a0: 63 74 65 72 20 72 65 66 65 72 65 6e 63 65 20 69  cter reference i
58b0: 6e 0a 64 65 63 69 6d 61 6c 20 72 65 70 72 65 73  n.decimal repres
58c0: 65 6e 74 61 74 69 6f 6e 2e 20 49 66 20 74 68 65  entation. If the
58d0: 20 6f 70 74 69 6f 6e 20 3c 69 20 63 6c 61 73 73   option <i class
58e0: 3d 22 6d 22 3e 2d 68 74 6d 6c 45 6e 74 69 74 69  ="m">-htmlEntiti
58f0: 65 73 3c 2f 69 3e 20 69 73 20 67 69 76 65 6e 2c  es</i> is given,
5900: 20 61 0a 63 68 61 72 61 63 74 65 72 20 69 73 20   a.character is 
5910: 77 72 69 74 74 65 6e 20 75 73 69 6e 67 20 69 74  written using it
5920: 73 20 48 54 4d 4c 20 34 2e 30 31 20 63 68 61 72  s HTML 4.01 char
5930: 61 63 74 65 72 20 65 6e 74 69 74 79 20 72 65 66  acter entity ref
5940: 65 72 65 6e 63 65 2c 20 69 66 20 6f 6e 65 20 69  erence, if one i
5950: 73 0a 64 65 66 69 6e 65 64 20 66 6f 72 20 69 74  s.defined for it
5960: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20  .</dd>.      .. 
5970: 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64       .        <d
5980: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68  t><b class="meth
5990: 6f 64 22 3e 61 73 54 65 78 74 3c 2f 62 3e 3c 2f  od">asText</b></
59a0: 64 74 3e 0a 20 20 20 20 20 20 20 20 20 20 3c 64  dt>.          <d
59b0: 64 3e 46 6f 72 20 45 4c 45 4d 45 4e 54 5f 4e 4f  d>For ELEMENT_NO
59c0: 44 45 73 2c 20 74 68 65 20 61 73 54 65 78 74 20  DEs, the asText 
59d0: 6d 65 74 68 6f 64 20 6f 75 74 70 75 74 73 20 0a  method outputs .
59e0: 74 68 65 20 73 74 72 69 6e 67 2d 76 61 6c 75 65  the string-value
59f0: 20 6f 66 20 65 76 65 72 79 20 74 65 78 74 20 6e   of every text n
5a00: 6f 64 65 20 64 65 73 63 65 6e 64 61 6e 74 20 6f  ode descendant o
5a10: 66 20 6e 6f 64 65 20 69 6e 20 64 6f 63 75 6d 65  f node in docume
5a20: 6e 74 0a 6f 72 64 65 72 20 77 69 74 68 6f 75 74  nt.order without
5a30: 20 61 6e 79 20 65 73 63 61 70 69 6e 67 2e 20 46   any escaping. F
5a40: 6f 72 20 65 76 65 72 79 20 6f 74 68 65 72 20 6e  or every other n
5a50: 6f 64 65 20 74 79 70 65 2c 20 74 68 69 73 20 6d  ode type, this m
5a60: 65 74 68 6f 64 20 6f 75 74 70 75 74 73 20 74 68  ethod outputs th
5a70: 65 20 58 50 61 74 68 20 73 74 72 69 6e 67 20 76  e XPath string v
5a80: 61 6c 75 65 20 6f 66 20 74 68 61 74 20 6e 6f 64  alue of that nod
5a90: 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  e.</dd>.      ..
5aa0: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
5ab0: 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65  dt>.<b class="me
5ac0: 74 68 6f 64 22 3e 61 70 70 65 6e 64 46 72 6f 6d  thod">appendFrom
5ad0: 4c 69 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  List</b> <i clas
5ae0: 73 3d 22 6d 22 3e 6c 69 73 74 3c 2f 69 3e 0a 3c  s="m">list</i>.<
5af0: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
5b00: 3e 50 61 72 73 65 73 20 3c 69 20 63 6c 61 73 73  >Parses <i class
5b10: 3d 22 6d 22 3e 6c 69 73 74 3c 2f 69 3e 20 2c 20  ="m">list</i> , 
5b20: 63 72 65 61 74 65 73 20 61 6e 20 61 63 63 6f 72  creates an accor
5b30: 64 69 6e 67 20 44 4f 4d 20 73 75 62 74 72 65 65  ding DOM subtree
5b40: 20 61 6e 64 0a 61 70 70 65 6e 64 73 20 74 68 69   and.appends thi
5b50: 73 20 73 75 62 74 72 65 65 20 74 6f 20 74 68 65  s subtree to the
5b60: 20 63 75 72 72 65 6e 74 20 6e 6f 64 65 2e 3c 2f   current node.</
5b70: 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20 20  dd>.      ..    
5b80: 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 0a    .        <dt>.
5b90: 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64  <b class="method
5ba0: 22 3e 61 70 70 65 6e 64 46 72 6f 6d 53 63 72 69  ">appendFromScri
5bb0: 70 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  pt</b> <i class=
5bc0: 22 6d 22 3e 74 63 6c 53 63 72 69 70 74 3c 2f 69  "m">tclScript</i
5bd0: 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  >.</dt>.        
5be0: 3c 64 64 3e 41 70 70 65 6e 64 73 20 74 68 65 20  <dd>Appends the 
5bf0: 6e 6f 64 65 73 20 63 72 65 61 74 65 64 20 69 6e  nodes created in
5c00: 20 74 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d   the <i class="m
5c10: 22 3e 74 63 6c 53 63 72 69 70 74 3c 2f 69 3e 20  ">tclScript</i> 
5c20: 62 79 0a 54 63 6c 20 66 75 6e 63 74 69 6f 6e 73  by.Tcl functions
5c30: 2c 20 77 68 69 63 68 20 68 61 76 65 20 62 65 65  , which have bee
5c40: 6e 20 62 75 69 6c 74 20 75 73 69 6e 67 20 3c 69  n built using <i
5c50: 20 63 6c 61 73 73 3d 22 6d 22 3e 64 6f 6d 20 63   class="m">dom c
5c60: 72 65 61 74 65 4e 6f 64 65 43 6d 64 3c 2f 69 3e  reateNodeCmd</i>
5c70: 2c 20 74 6f 20 74 68 65 0a 67 69 76 65 6e 20 6e  , to the.given n
5c80: 6f 64 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  ode.</dd>.      
5c90: 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20  ..      .       
5ca0: 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22   <dt>.<b class="
5cb0: 6d 65 74 68 6f 64 22 3e 69 6e 73 65 72 74 42 65  method">insertBe
5cc0: 66 6f 72 65 46 72 6f 6d 53 63 72 69 70 74 3c 2f  foreFromScript</
5cd0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  b> <i class="m">
5ce0: 74 63 6c 53 63 72 69 70 74 3c 2f 69 3e 20 3c 69  tclScript</i> <i
5cf0: 20 63 6c 61 73 73 3d 22 6d 22 3e 72 65 66 43 68   class="m">refCh
5d00: 69 6c 64 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20  ild</i>.</dt>.  
5d10: 20 20 20 20 20 20 3c 64 64 3e 49 6e 73 65 72 74        <dd>Insert
5d20: 73 20 74 68 65 20 6e 6f 64 65 73 20 63 72 65 61  s the nodes crea
5d30: 74 65 64 20 69 6e 20 74 68 65 20 3c 69 20 63 6c  ted in the <i cl
5d40: 61 73 73 3d 22 6d 22 3e 74 63 6c 53 63 72 69 70  ass="m">tclScrip
5d50: 74 3c 2f 69 3e 20 62 79 0a 54 63 6c 20 66 75 6e  t</i> by.Tcl fun
5d60: 63 74 69 6f 6e 73 2c 20 77 68 69 63 68 20 68 61  ctions, which ha
5d70: 76 65 20 62 65 65 6e 20 62 75 69 6c 74 20 75 73  ve been built us
5d80: 69 6e 67 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22  ing <i class="m"
5d90: 3e 64 6f 6d 20 63 72 65 61 74 65 4e 6f 64 65 43  >dom createNodeC
5da0: 6d 64 3c 2f 69 3e 2c 20 62 65 66 6f 72 65 20 74  md</i>, before t
5db0: 68 65 0a 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  he.<i class="m">
5dc0: 72 65 66 43 68 69 6c 64 3c 2f 69 3e 20 69 6e 74  refChild</i> int
5dd0: 6f 20 74 68 65 20 6c 69 73 74 20 6f 66 20 63 68  o the list of ch
5de0: 69 6c 64 72 65 6e 20 6f 66 20 6e 6f 64 65 2e 20  ildren of node. 
5df0: 49 66 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  If <i class="m">
5e00: 72 65 66 43 68 69 6c 64 3c 2f 69 3e 20 69 73 0a  refChild</i> is.
5e10: 74 68 65 20 65 6d 70 74 79 20 73 74 72 69 6e 67  the empty string
5e20: 2c 20 74 68 65 20 6e 65 77 20 6e 6f 64 65 73 20  , the new nodes 
5e30: 77 69 6c 6c 20 62 65 20 61 70 70 65 6e 64 65 64  will be appended
5e40: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20  .</dd>.      .. 
5e50: 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64       .        <d
5e60: 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  t>.<b class="met
5e70: 68 6f 64 22 3e 61 70 70 65 6e 64 58 4d 4c 3c 2f  hod">appendXML</
5e80: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  b> <i class="m">
5e90: 58 4d 4c 73 74 72 69 6e 67 3c 2f 69 3e 0a 3c 2f  XMLstring</i>.</
5ea0: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
5eb0: 50 61 72 73 65 73 20 3c 69 20 63 6c 61 73 73 3d  Parses <i class=
5ec0: 22 6d 22 3e 58 4d 4c 73 74 72 69 6e 67 3c 2f 69  "m">XMLstring</i
5ed0: 3e 2c 20 63 72 65 61 74 65 73 20 61 6e 20 61 63  >, creates an ac
5ee0: 63 6f 72 64 69 6e 67 20 44 4f 4d 20 73 75 62 74  cording DOM subt
5ef0: 72 65 65 20 61 6e 64 0a 61 70 70 65 6e 64 73 20  ree and.appends 
5f00: 74 68 69 73 20 73 75 62 74 72 65 65 20 74 6f 20  this subtree to 
5f10: 74 68 65 20 63 75 72 72 65 6e 74 20 6e 6f 64 65  the current node
5f20: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20  .</dd>.      .. 
5f30: 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64       .        <d
5f40: 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74  t>.<b class="met
5f50: 68 6f 64 22 3e 73 69 6d 70 6c 65 54 72 61 6e 73  hod">simpleTrans
5f60: 6c 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  late</b> <i clas
5f70: 73 3d 22 6d 22 3e 6f 75 74 70 75 74 56 61 72 3c  s="m">outputVar<
5f80: 2f 69 3e 0a 3c 69 20 63 6c 61 73 73 3d 22 6d 22  /i>.<i class="m"
5f90: 3e 73 70 65 63 69 66 69 63 61 74 69 6f 6e 73 3c  >specifications<
5fa0: 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /i>.</dt>.      
5fb0: 20 20 3c 64 64 3e 54 72 61 6e 73 6c 61 74 65 73    <dd>Translates
5fc0: 20 74 68 65 20 73 75 62 74 72 65 65 20 73 74 61   the subtree sta
5fd0: 72 74 69 6e 67 20 61 74 20 74 68 65 20 6f 62 6a  rting at the obj
5fe0: 65 63 74 20 6e 6f 64 65 20 61 63 63 6f 72 64 69  ect node accordi
5ff0: 6e 67 20 74 6f 0a 74 68 65 20 73 70 65 63 69 66  ng to.the specif
6000: 69 63 61 74 69 6f 6e 73 20 69 6e 20 3c 69 20 63  ications in <i c
6010: 6c 61 73 73 3d 22 6d 22 3e 73 70 65 63 69 66 69  lass="m">specifi
6020: 63 61 74 69 6f 6e 73 3c 2f 69 3e 20 61 6e 64 20  cations</i> and 
6030: 6f 75 74 70 75 74 73 20 74 68 65 20 72 65 73 75  outputs the resu
6040: 6c 74 20 69 6e 20 74 68 65 0a 76 61 72 69 61 62  lt in the.variab
6050: 6c 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  le <i class="m">
6060: 6f 75 74 70 75 74 56 61 72 3c 2f 69 3e 20 2e 20  outputVar</i> . 
6070: 54 68 65 20 74 72 61 6e 73 6c 61 74 69 6f 6e 20  The translation 
6080: 69 73 20 76 65 72 79 20 73 69 6d 69 6c 61 72 20  is very similar 
6090: 74 6f 20 43 6f 73 74 20 53 69 6d 70 6c 65 0a 6d  to Cost Simple.m
60a0: 6f 64 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  ode.</dd>.      
60b0: 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20  ..      .       
60c0: 20 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22   <dt>.<b class="
60d0: 6d 65 74 68 6f 64 22 3e 74 6f 58 50 61 74 68 3c  method">toXPath<
60e0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22  /b> <i class="m"
60f0: 3e 3f 2d 6c 65 67 61 63 79 3f 3c 2f 69 3e 0a 3c  >?-legacy?</i>.<
6100: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
6110: 3e 52 65 74 75 72 6e 73 20 61 6e 20 58 50 61 74  >Returns an XPat
6120: 68 2c 20 77 68 69 63 68 20 65 78 61 63 74 6c 79  h, which exactly
6130: 20 61 64 64 72 65 73 73 65 73 20 74 68 65 20 67   addresses the g
6140: 69 76 65 6e 0a 6e 6f 64 65 20 69 6e 20 69 74 73  iven.node in its
6150: 20 64 6f 63 75 6d 65 6e 74 2e 20 54 68 69 73 20   document. This 
6160: 58 50 61 74 68 20 69 73 20 6f 6e 6c 79 20 76 61  XPath is only va
6170: 6c 69 64 20 61 73 20 74 68 65 72 65 20 61 72 65  lid as there are
6180: 20 6e 6f 20 63 68 61 6e 67 65 73 20 74 6f 20 44   no changes to D
6190: 4f 4d 0a 74 72 65 65 20 6d 61 64 65 20 6c 61 74  OM.tree made lat
61a0: 65 72 20 6f 6e 65 2e 20 57 69 74 68 20 74 68 65  er one. With the
61b0: 20 2d 6c 65 67 61 63 79 20 6f 70 74 69 6f 6e 2c   -legacy option,
61c0: 20 6f 74 68 65 72 20 58 50 61 74 68 20 65 78 70   other XPath exp
61d0: 72 65 73 73 69 6f 6e 73 0a 61 72 65 20 72 65 74  ressions.are ret
61e0: 75 72 6e 65 64 2c 20 77 68 69 63 68 20 64 6f 65  urned, which doe
61f0: 73 6e 27 74 20 77 6f 72 6b 20 69 6e 20 61 6c 6c  sn't work in all
6200: 20 63 61 73 65 73 2e 3c 2f 64 64 3e 0a 20 20 20   cases.</dd>.   
6210: 20 20 20 0a 0a 20 20 20 20 20 20 0a 20 20 20 20     ..      .    
6220: 20 20 20 20 3c 64 74 3e 3c 62 20 63 6c 61 73 73      <dt><b class
6230: 3d 22 6d 65 74 68 6f 64 22 3e 67 65 74 42 61 73  ="method">getBas
6240: 65 55 52 49 3c 2f 62 3e 3c 2f 64 74 3e 0a 20 20  eURI</b></dt>.  
6250: 20 20 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e        <dd>Return
6260: 73 20 74 68 65 20 62 61 73 65 55 52 49 20 6f 66  s the baseURI of
6270: 20 74 68 65 20 6e 6f 64 65 2e 20 54 68 69 73 20   the node. This 
6280: 6d 65 74 68 6f 64 20 69 73 20 64 65 70 72 65 63  method is deprec
6290: 61 74 65 64 20 69 6e 0a 20 20 20 20 20 20 20 20  ated in.        
62a0: 20 20 66 61 76 6f 72 20 6f 66 20 74 68 65 20 3c    favor of the <
62b0: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 62 61 73 65  i class="m">base
62c0: 55 52 49 3c 2f 69 3e 20 6d 65 74 68 6f 64 2e 3c  URI</i> method.<
62d0: 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20  /dd>.      ..   
62e0: 20 20 20 0a 20 20 20 20 20 20 20 20 3c 64 74 3e     .        <dt>
62f0: 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f  .<b class="metho
6300: 64 22 3e 62 61 73 65 55 52 49 3c 2f 62 3e 20 3c  d">baseURI</b> <
6310: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 3f 55 52 49  i class="m">?URI
6320: 3f 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20  ?</i>.</dt>.    
6330: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
6340: 74 68 65 20 70 72 65 73 65 6e 74 20 62 61 73 65  the present base
6350: 55 52 49 20 6f 66 20 74 68 65 20 6e 6f 64 65 2e  URI of the node.
6360: 20 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 61 6c   If the optional
6370: 20 0a 61 72 67 75 6d 65 6e 74 20 55 52 49 20 69   .argument URI i
6380: 73 20 67 69 76 65 6e 2c 20 69 74 20 73 65 74 73  s given, it sets
6390: 20 74 68 65 20 62 61 73 65 20 55 52 49 20 6f 66   the base URI of
63a0: 20 74 68 65 20 6e 6f 64 65 20 61 6e 64 20 6f 66   the node and of
63b0: 20 61 6c 6c 20 6f 66 20 69 74 73 20 63 68 69 6c   all of its chil
63c0: 64 0a 6e 6f 64 65 73 20 6f 75 74 20 6f 66 20 74  d.nodes out of t
63d0: 68 65 20 73 61 6d 65 20 65 6e 74 69 74 79 20 61  he same entity a
63e0: 73 20 6e 6f 64 65 20 74 6f 20 74 68 65 20 67 69  s node to the gi
63f0: 76 65 6e 20 55 52 49 2e 3c 2f 64 64 3e 0a 20 20  ven URI.</dd>.  
6400: 20 20 20 20 0a 0a 20 20 20 20 20 20 0a 20 20 20      ..      .   
6410: 20 20 20 20 20 3c 64 74 3e 0a 3c 62 20 63 6c 61       <dt>.<b cla
6420: 73 73 3d 22 6d 65 74 68 6f 64 22 3e 64 69 73 61  ss="method">disa
6430: 62 6c 65 4f 75 74 70 75 74 45 73 63 61 70 69 6e  bleOutputEscapin
6440: 67 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  g</b> <i class="
6450: 6d 22 3e 3f 62 6f 6f 6c 65 61 6e 3f 3c 2f 69 3e  m">?boolean?</i>
6460: 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  .</dt>.        <
6470: 64 64 3e 54 68 69 73 20 6d 65 74 68 6f 64 20 77  dd>This method w
6480: 6f 72 6b 73 20 6f 6e 6c 79 20 66 6f 72 20 74 65  orks only for te
6490: 78 74 20 6e 6f 64 65 73 3b 20 66 6f 72 20 65 76  xt nodes; for ev
64a0: 65 72 79 20 6f 74 68 65 72 20 6e 6f 64 65 20 69  ery other node i
64b0: 74 0a 72 65 74 75 72 6e 73 20 65 72 72 6f 72 2e  t.returns error.
64c0: 20 57 69 74 68 6f 75 74 20 74 68 65 20 6f 70 74   Without the opt
64d0: 69 6f 6e 61 6c 20 61 72 67 75 6d 65 6e 74 20 69  ional argument i
64e0: 74 20 72 65 74 75 72 6e 73 2c 20 69 66 20 64 69  t returns, if di
64f0: 73 61 62 6c 69 6e 67 20 6f 75 74 70 75 74 0a 65  sabling output.e
6500: 73 63 61 70 69 6e 67 20 69 73 20 6f 6e 2e 20 54  scaping is on. T
6510: 68 65 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20  he return value 
6520: 30 20 6d 65 61 6e 73 2c 20 74 68 65 20 63 68 61  0 means, the cha
6530: 72 61 63 74 65 72 73 20 6f 66 20 74 68 65 20 74  racters of the t
6540: 65 78 74 20 6e 6f 64 65 20 77 69 6c 6c 0a 62 65  ext node will.be
6550: 20 65 73 63 61 70 65 64 2c 20 74 6f 20 67 65 6e   escaped, to gen
6560: 65 72 61 74 65 20 76 61 6c 69 64 20 58 4d 4c 2c  erate valid XML,
6570: 20 69 66 20 73 65 72 69 61 6c 69 7a 65 64 2e 20   if serialized. 
6580: 54 68 69 73 20 69 73 20 74 68 65 20 64 65 66 61  This is the defa
6590: 75 6c 74 20 66 6f 72 0a 65 76 65 72 79 20 70 61  ult for.every pa
65a0: 72 73 65 64 20 6f 72 20 63 72 65 61 74 65 64 20  rsed or created 
65b0: 74 65 78 74 20 6e 6f 64 65 20 28 77 69 74 68 20  text node (with 
65c0: 74 68 65 20 65 78 63 65 70 74 69 6f 6e 20 6f 66  the exception of
65d0: 20 74 68 61 74 20 74 65 78 74 20 6e 6f 64 65 73   that text nodes
65e0: 20 69 6e 20 61 0a 72 65 73 75 6c 74 20 74 72 65   in a.result tre
65f0: 65 20 6f 66 20 61 6e 20 58 53 4c 54 20 74 72 61  e of an XSLT tra
6600: 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 66 6f 72  nsformation, for
6610: 20 77 68 69 63 68 20 64 69 73 61 62 6c 69 6e 67   which disabling
6620: 20 6f 75 74 70 75 74 20 65 73 63 61 70 69 6e 67   output escaping
6630: 20 77 61 73 0a 72 65 71 75 65 73 74 65 64 20 65   was.requested e
6640: 78 70 6c 69 63 69 74 6c 79 20 69 6e 20 74 68 65  xplicitly in the
6650: 20 73 74 79 6c 65 73 68 65 65 74 29 2e 20 54 68   stylesheet). Th
6660: 65 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 31  e return value 1
6670: 20 6d 65 61 6e 73 2c 20 74 68 61 74 20 6f 75 74   means, that out
6680: 70 75 74 0a 65 73 63 61 70 69 6e 67 20 69 73 20  put.escaping is 
6690: 64 69 73 61 62 6c 65 64 20 66 6f 72 20 74 68 69  disabled for thi
66a0: 73 20 74 65 78 74 20 6e 6f 64 65 2e 20 49 66 20  s text node. If 
66b0: 73 75 63 68 20 61 20 74 65 78 74 20 6e 6f 64 65  such a text node
66c0: 20 69 73 20 73 65 72 69 61 6c 69 7a 65 64 0a 28   is serialized.(
66d0: 77 69 74 68 20 61 73 58 4d 4c 20 6f 72 20 61 73  with asXML or as
66e0: 48 54 4d 4c 29 2c 20 69 74 20 69 73 20 6c 69 74  HTML), it is lit
66f0: 65 72 61 6c 6c 79 20 77 72 69 74 74 65 6e 2c 20  erally written, 
6700: 77 69 74 68 6f 75 74 20 65 73 63 61 70 69 6e 67  without escaping
6710: 20 6f 66 20 74 68 65 0a 73 70 65 63 69 61 6c 20   of the.special 
6720: 58 4d 4c 20 63 68 61 72 61 63 74 65 72 73 2e 20  XML characters. 
6730: 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 61 6c 20  If the optional 
6740: 62 6f 6f 6c 65 61 6e 20 76 61 6c 75 65 20 3c 69  boolean value <i
6750: 20 63 6c 61 73 73 3d 22 6d 22 3e 62 6f 6f 6c 65   class="m">boole
6760: 61 6e 3c 2f 69 3e 20 69 73 20 67 69 76 65 6e 2c  an</i> is given,
6770: 0a 74 68 65 20 66 6c 61 67 20 69 73 20 73 65 74  .the flag is set
6780: 20 61 63 63 6f 72 64 69 6e 67 6c 79 2e 20 59 6f   accordingly. Yo
6790: 75 20 73 68 6f 75 6c 64 20 6e 6f 74 20 73 65 74  u should not set
67a0: 20 74 68 69 73 20 66 6c 61 67 20 74 6f 20 31 20   this flag to 1 
67b0: 75 6e 74 69 6c 20 79 6f 75 0a 72 65 61 6c 6c 79  until you.really
67c0: 20 6b 6e 6f 77 20 77 68 61 74 20 79 6f 75 20 64   know what you d
67d0: 6f 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  o.</dd>.      ..
67e0: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
67f0: 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65  dt>.<b class="me
6800: 74 68 6f 64 22 3e 70 72 65 63 65 64 65 73 3c 2f  thod">precedes</
6810: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  b> <i class="m">
6820: 72 65 66 6e 6f 64 65 3c 2f 69 3e 0a 3c 2f 64 74  refnode</i>.</dt
6830: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43 6f  >.        <dd>Co
6840: 6d 70 61 72 65 73 20 74 68 65 20 72 65 6c 61 74  mpares the relat
6850: 69 76 65 20 6f 72 64 65 72 20 6f 66 20 74 68 65  ive order of the
6860: 20 6e 6f 64 65 20 61 6e 64 20 3c 69 20 63 6c 61   node and <i cla
6870: 73 73 3d 22 6d 22 3e 72 65 66 6e 6f 64 65 3c 2f  ss="m">refnode</
6880: 69 3e 2e 20 42 6f 74 68 0a 6e 6f 64 65 73 20 6d  i>. Both.nodes m
6890: 75 73 74 20 62 65 20 70 61 72 74 20 6f 66 20 74  ust be part of t
68a0: 68 65 20 73 61 6d 65 20 64 6f 63 75 6d 65 6e 74  he same document
68b0: 73 20 61 6e 64 20 6e 6f 74 20 6f 75 74 20 6f 66  s and not out of
68c0: 20 74 68 65 20 66 72 61 67 6d 65 6e 74 20 6c 69   the fragment li
68d0: 73 74 20 6f 66 0a 74 68 65 20 64 6f 63 75 6d 65  st of.the docume
68e0: 6e 74 2e 20 52 65 74 75 72 6e 73 20 74 72 75 65  nt. Returns true
68f0: 20 69 66 20 6e 6f 64 65 20 69 73 20 69 6e 20 64   if node is in d
6900: 6f 63 75 6d 65 6e 74 20 6f 72 64 65 72 20 28 69  ocument order (i
6910: 6e 20 74 68 65 20 73 65 6e 73 65 20 6f 66 20 74  n the sense of t
6920: 68 65 0a 58 50 61 74 68 20 31 2e 30 20 72 65 63  he.XPath 1.0 rec
6930: 6f 6d 6d 65 6e 64 61 74 69 6f 6e 29 20 62 65 66  ommendation) bef
6940: 6f 72 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22  ore <i class="m"
6950: 3e 72 65 66 6e 6f 64 65 3c 2f 69 3e 2c 20 61 6e  >refnode</i>, an
6960: 64 20 66 61 6c 73 65 20 6f 74 68 65 72 77 69 73  d false otherwis
6970: 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  e.</dd>.      ..
6980: 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20  .      .        
6990: 3c 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d  <dt>.<b class="m
69a0: 65 74 68 6f 64 22 3e 6e 6f 72 6d 61 6c 69 7a 65  ethod">normalize
69b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 6d  </b> <i class="m
69c0: 22 3e 3f 2d 66 6f 72 58 50 61 74 68 3f 3c 2f 69  ">?-forXPath?</i
69d0: 3e 0a 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  >.</dt>.        
69e0: 3c 64 64 3e 50 75 74 73 20 61 6c 6c 20 54 65 78  <dd>Puts all Tex
69f0: 74 20 6e 6f 64 65 73 20 69 6e 20 74 68 65 20 66  t nodes in the f
6a00: 75 6c 6c 20 64 65 70 74 68 20 6f 66 20 74 68 65  ull depth of the
6a10: 20 73 75 62 2d 74 72 65 65 20 75 6e 64 65 72 6e   sub-tree undern
6a20: 65 61 74 68 0a 74 68 69 73 20 4e 6f 64 65 20 69  eath.this Node i
6a30: 6e 74 6f 20 61 20 22 6e 6f 72 6d 61 6c 22 20 66  nto a "normal" f
6a40: 6f 72 6d 20 77 68 65 72 65 20 6f 6e 6c 79 20 73  orm where only s
6a50: 74 72 75 63 74 75 72 65 20 28 65 2e 67 2e 2c 20  tructure (e.g., 
6a60: 65 6c 65 6d 65 6e 74 73 2c 0a 63 6f 6d 6d 65 6e  elements,.commen
6a70: 74 73 2c 20 70 72 6f 63 65 73 73 69 6e 67 20 69  ts, processing i
6a80: 6e 73 74 72 75 63 74 69 6f 6e 73 20 61 6e 64 20  nstructions and 
6a90: 43 44 41 54 41 0a 73 65 63 74 69 6f 6e 73 29 20  CDATA.sections) 
6aa0: 73 65 70 61 72 61 74 65 73 20 54 65 78 74 20 6e  separates Text n
6ab0: 6f 64 65 73 2c 20 69 2e 65 2e 2c 20 74 68 65 72  odes, i.e., ther
6ac0: 65 0a 61 72 65 20 6e 65 69 74 68 65 72 20 61 64  e.are neither ad
6ad0: 6a 61 63 65 6e 74 20 54 65 78 74 20 6e 6f 64 65  jacent Text node
6ae0: 73 20 6e 6f 72 20 65 6d 70 74 79 20 54 65 78 74  s nor empty Text
6af0: 20 6e 6f 64 65 73 2e 20 49 66 20 74 68 65 20 6f   nodes. If the o
6b00: 70 74 69 6f 6e 0a 3c 69 20 63 6c 61 73 73 3d 22  ption.<i class="
6b10: 6d 22 3e 2d 66 6f 72 58 50 61 74 68 3c 2f 69 3e  m">-forXPath</i>
6b20: 20 69 73 20 67 69 76 65 6e 2c 20 61 6c 6c 20 43   is given, all C
6b30: 44 41 54 41 20 73 65 63 74 69 6f 6e 73 20 69 6e  DATA sections in
6b40: 20 74 68 65 20 6e 6f 64 65 73 20 61 72 65 0a 63   the nodes are.c
6b50: 6f 6e 76 65 72 74 65 64 20 74 6f 20 74 65 78 74  onverted to text
6b60: 20 6e 6f 64 65 73 2c 20 61 73 20 61 20 66 69 72   nodes, as a fir
6b70: 73 74 20 73 74 65 70 20 62 65 66 6f 72 65 20 74  st step before t
6b80: 68 65 0a 6e 6f 72 6d 61 6c 69 7a 61 74 69 6f 6e  he.normalization
6b90: 2e 20 3c 2f 64 64 3e 0a 20 20 20 20 20 20 0a 0a  . </dd>.      ..
6ba0: 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 3c        .        <
6bb0: 64 74 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6d 65  dt>.<b class="me
6bc0: 74 68 6f 64 22 3e 78 73 6c 74 3c 2f 62 3e 20 3c  thod">xslt</b> <
6bd0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
6be0: 3e 3f 2d 70 61 72 61 6d 65 74 65 72 73 0a 70 61  >?-parameters.pa
6bf0: 72 61 6d 65 74 65 72 4c 69 73 74 3f 3c 2f 62 3e  rameterList?</b>
6c00: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
6c10: 6e 22 3e 3f 2d 69 67 6e 6f 72 65 55 6e 64 65 63  n">?-ignoreUndec
6c20: 6c 61 72 65 64 50 61 72 61 6d 65 74 65 72 73 3f  laredParameters?
6c30: 3c 2f 62 3e 0a 3c 62 20 63 6c 61 73 73 3d 22 6f  </b>.<b class="o
6c40: 70 74 69 6f 6e 22 3e 3f 2d 6d 61 78 41 70 70 6c  ption">?-maxAppl
6c50: 79 44 65 70 74 68 20 69 6e 74 3f 3c 2f 62 3e 0a  yDepth int?</b>.
6c60: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
6c70: 22 3e 3f 2d 78 73 6c 74 6d 65 73 73 61 67 65 63  ">?-xsltmessagec
6c80: 6d 64 20 73 63 72 69 70 74 3f 3c 2f 62 3e 20 3c  md script?</b> <
6c90: 69 20 63 6c 61 73 73 3d 22 6d 22 3e 73 74 79 6c  i class="m">styl
6ca0: 65 73 68 65 65 74 3c 2f 69 3e 20 3c 69 20 63 6c  esheet</i> <i cl
6cb0: 61 73 73 3d 22 6d 22 3e 3f 6f 75 74 70 75 74 56  ass="m">?outputV
6cc0: 61 72 3f 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20  ar?</i>.</dt>.  
6cd0: 20 20 20 20 20 20 3c 64 64 3e 41 70 70 6c 69 65        <dd>Applie
6ce0: 73 20 61 6e 20 58 53 4c 54 20 74 72 61 6e 73 66  s an XSLT transf
6cf0: 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20  ormation on the 
6d00: 64 6f 63 75 6d 65 6e 74 20 75 73 69 6e 67 20 74  document using t
6d10: 68 65 20 58 53 4c 54 0a 3c 69 20 63 6c 61 73 73  he XSLT.<i class
6d20: 3d 22 6d 22 3e 73 74 79 6c 65 73 68 65 65 74 3c  ="m">stylesheet<
6d30: 2f 69 3e 20 28 67 69 76 65 6e 20 61 73 20 64 6f  /i> (given as do
6d40: 6d 44 6f 63 29 2e 20 52 65 74 75 72 6e 73 20 61  mDoc). Returns a
6d50: 20 64 6f 63 75 6d 65 6e 74 20 6f 62 6a 65 63 74   document object
6d60: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 0a   containing the.
6d70: 72 65 73 75 6c 74 20 64 6f 63 75 6d 65 6e 74 20  result document 
6d80: 6f 66 20 74 68 61 74 20 74 72 61 6e 73 66 6f 72  of that transfor
6d90: 6d 61 74 69 6f 6e 20 61 6e 64 20 73 74 6f 72 65  mation and store
6da0: 73 20 69 74 20 69 6e 20 74 68 65 20 6f 70 74 69  s it in the opti
6db0: 6f 6e 61 6c 0a 3c 69 20 63 6c 61 73 73 3d 22 6d  onal.<i class="m
6dc0: 22 3e 6f 75 74 70 75 74 56 61 72 3c 2f 69 3e 2e  ">outputVar</i>.
6dd0: 20 0a 0a 3c 70 3e 54 68 65 20 6f 70 74 69 6f 6e   ..<p>The option
6de0: 61 6c 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  al <i class="m">
6df0: 2d 70 61 72 61 6d 65 74 65 72 73 3c 2f 69 3e 20  -parameters</i> 
6e00: 6f 70 74 69 6f 6e 20 73 65 74 73 20 74 6f 70 20  option sets top 
6e10: 6c 65 76 65 6c 0a 26 6c 74 3b 78 73 6c 3a 70 61  level.&lt;xsl:pa
6e20: 72 61 6d 26 67 74 3b 20 74 6f 20 73 74 72 69 6e  ram&gt; to strin
6e30: 67 20 76 61 6c 75 65 73 2e 20 54 68 65 20 3c 69  g values. The <i
6e40: 20 63 6c 61 73 73 3d 22 6d 22 3e 70 61 72 61 6d   class="m">param
6e50: 65 74 65 72 4c 69 73 74 3c 2f 69 3e 20 68 61 73  eterList</i> has
6e60: 20 74 6f 20 62 65 20 61 20 74 63 6c 0a 6c 69 73   to be a tcl.lis
6e70: 74 20 63 6f 6e 73 69 73 74 69 6e 67 20 6f 66 20  t consisting of 
6e80: 70 61 72 61 6d 65 74 65 72 20 6e 61 6d 65 20 61  parameter name a
6e90: 6e 64 20 76 61 6c 75 65 20 70 61 69 72 73 2e 3c  nd value pairs.<
6ea0: 2f 70 3e 0a 0a 3c 70 3e 49 66 20 74 68 65 20 6f  /p>..<p>If the o
6eb0: 70 74 69 6f 6e 20 3c 69 20 63 6c 61 73 73 3d 22  ption <i class="
6ec0: 6d 22 3e 2d 69 67 6e 6f 72 65 55 6e 64 65 63 6c  m">-ignoreUndecl
6ed0: 61 72 65 64 50 61 72 61 6d 65 74 65 72 73 3c 2f  aredParameters</
6ee0: 69 3e 20 69 73 20 67 69 76 65 6e 2c 20 74 68 65  i> is given, the
6ef0: 6e 20 70 61 72 61 6d 65 74 65 72 0a 6e 61 6d 65  n parameter.name
6f00: 73 20 69 6e 20 74 68 65 20 3c 69 20 63 6c 61 73  s in the <i clas
6f10: 73 3d 22 6d 22 3e 70 61 72 61 6d 65 74 65 72 4c  s="m">parameterL
6f20: 69 73 74 3c 2f 69 3e 20 67 69 76 65 6e 20 74 6f  ist</i> given to
6f30: 20 74 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d   the <i class="m
6f40: 22 3e 2d 70 61 72 61 6d 65 74 65 72 73 3c 2f 69  ">-parameters</i
6f50: 3e 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 0a 61  > options that.a
6f60: 72 65 20 6e 6f 74 20 64 65 63 6c 61 72 65 64 20  re not declared 
6f70: 61 73 20 74 6f 70 2d 6c 65 76 65 6c 20 70 61 72  as top-level par
6f80: 61 6d 65 74 65 72 73 20 69 6e 20 74 68 65 20 73  ameters in the s
6f90: 74 79 6c 65 73 68 65 65 74 20 61 72 65 20 73 69  tylesheet are si
6fa0: 6c 65 6e 74 6c 79 0a 69 67 6e 6f 72 65 64 2e 20  lently.ignored. 
6fb0: 57 69 74 68 6f 75 74 20 74 68 69 73 20 6f 70 74  Without this opt
6fc0: 69 6f 6e 2c 20 61 6e 20 65 72 72 6f 72 20 69 73  ion, an error is
6fd0: 20 72 61 69 73 65 64 20 69 66 20 74 68 65 20 75   raised if the u
6fe0: 73 65 72 20 74 72 69 65 73 20 74 6f 20 73 65 74  ser tries to set
6ff0: 20 61 0a 74 6f 70 2d 6c 65 76 65 6c 20 70 61 72   a.top-level par
7000: 61 6d 65 74 65 72 20 77 68 69 63 68 20 69 73 20  ameter which is 
7010: 6e 6f 74 20 64 65 63 6c 61 72 65 64 20 69 6e 20  not declared in 
7020: 74 68 65 20 73 74 79 6c 65 73 68 65 65 74 2e 3c  the stylesheet.<
7030: 2f 70 3e 0a 0a 3c 70 3e 54 68 65 20 6f 70 74 69  /p>..<p>The opti
7040: 6f 6e 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e  on <i class="m">
7050: 2d 6d 61 78 41 70 70 6c 79 44 65 70 74 68 3c 2f  -maxApplyDepth</
7060: 69 3e 20 65 78 70 65 63 74 73 20 61 20 70 6f 73  i> expects a pos
7070: 69 74 69 76 65 20 69 6e 74 65 67 65 72 20 61 73  itive integer as
7080: 0a 61 72 67 75 6d 65 6e 74 2e 20 42 79 20 64 65  .argument. By de
7090: 66 61 75 6c 74 2c 20 74 68 65 20 78 73 6c 74 20  fault, the xslt 
70a0: 65 6e 67 69 6e 65 20 61 6c 6c 6f 77 73 20 78 73  engine allows xs
70b0: 6c 74 20 74 65 6d 70 6c 61 74 65 73 20 74 6f 20  lt templates to 
70c0: 6e 65 73 74 20 75 70 0a 74 6f 20 33 30 30 30 20  nest up.to 3000 
70d0: 6c 65 76 65 6c 73 20 28 61 6e 64 20 72 61 69 73  levels (and rais
70e0: 65 73 20 65 72 72 6f 72 20 69 66 20 74 68 65 79  es error if they
70f0: 20 6e 65 73 74 20 64 65 65 70 65 72 29 2e 20 54   nest deeper). T
7100: 68 69 73 20 6c 69 6d 69 74 20 63 61 6e 0a 62 65  his limit can.be
7110: 20 73 65 74 20 62 79 20 74 68 65 20 3c 69 20 63   set by the <i c
7120: 6c 61 73 73 3d 22 6d 22 3e 2d 6d 61 78 41 70 70  lass="m">-maxApp
7130: 6c 79 44 65 70 74 68 3c 2f 69 3e 20 6f 70 74 69  lyDepth</i> opti
7140: 6f 6e 2e 3c 2f 70 3e 0a 0a 3c 70 3e 54 68 65 20  on.</p>..<p>The 
7150: 3c 69 20 63 6c 61 73 73 3d 22 6d 22 3e 2d 78 73  <i class="m">-xs
7160: 6c 74 6d 65 73 73 61 67 65 63 6d 64 3c 2f 69 3e  ltmessagecmd</i>
7170: 20 6f 70 74 69 6f 6e 20 73 65 74 73 20 61 20 63   option sets a c
7180: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 78 73 6c 74  allback for xslt
7190: 3a 6d 65 73 73 61 67 65 20 65 6c 65 6d 65 6e 74  :message element
71a0: 73 0a 69 6e 20 74 68 65 20 73 74 79 6c 65 73 68  s.in the stylesh
71b0: 65 65 74 2e 20 54 68 65 20 61 63 74 75 61 6c 20  eet. The actual 
71c0: 63 6f 6d 6d 61 6e 64 20 63 6f 6e 73 69 73 74 73  command consists
71d0: 20 6f 66 20 74 68 65 20 73 63 72 69 70 74 2c 20   of the script, 
71e0: 67 69 76 65 6e 20 61 73 20 61 72 67 75 6d 65 6e  given as argumen
71f0: 74 0a 74 6f 20 74 68 65 20 6f 70 74 69 6f 6e 2c  t.to the option,
7200: 20 61 70 70 65 6e 64 65 64 20 77 69 74 68 20 74   appended with t
7210: 68 65 20 58 4d 4c 20 46 72 61 67 6d 65 6e 74 20  he XML Fragment 
7220: 66 72 6f 6d 20 69 6e 73 74 61 6e 74 69 61 74 69  from instantiati
7230: 6e 67 20 74 68 65 0a 78 73 6c 3a 6d 65 73 73 61  ng the.xsl:messa
7240: 67 65 20 65 6c 65 6d 65 6e 74 20 63 6f 6e 74 65  ge element conte
7250: 6e 74 20 61 73 20 73 74 72 69 6e 67 20 28 61 73  nt as string (as
7260: 20 69 66 20 74 68 65 20 58 50 61 74 68 20 73 74   if the XPath st
7270: 72 69 6e 67 28 29 20 66 75 6e 63 74 69 6f 6e 20  ring() function 
7280: 77 6f 75 6c 64 0a 68 61 76 65 20 62 65 65 6e 20  would.have been 
7290: 61 70 70 6c 69 65 64 20 74 6f 20 74 68 65 20 58  applied to the X
72a0: 4d 4c 20 46 72 61 67 6d 65 6e 74 29 20 61 6e 64  ML Fragment) and
72b0: 20 61 20 66 6c 61 67 2c 20 77 68 69 63 68 20 69   a flag, which i
72c0: 6e 64 69 63 61 74 65 73 20 77 68 65 74 68 65 72  ndicates whether
72d0: 20 74 68 65 0a 78 73 6c 3a 6d 65 73 73 61 67 65   the.xsl:message
72e0: 20 68 61 73 20 61 6e 20 61 74 74 72 69 62 75 74   has an attribut
72f0: 65 20 22 74 65 72 6d 69 6e 61 74 65 22 20 77 69  e "terminate" wi
7300: 74 68 20 74 68 65 20 76 61 6c 75 65 20 22 79 65  th the value "ye
7310: 73 22 2e 20 49 66 20 74 68 65 0a 63 61 6c 6c 65  s". If the.calle
7320: 64 20 73 63 72 69 70 74 20 72 65 74 75 72 6e 73  d script returns
7330: 20 61 6e 79 74 68 69 6e 67 20 65 6c 73 65 20 74   anything else t
7340: 68 65 6e 20 54 43 4c 5f 4f 4b 20 74 68 65 6e 20  hen TCL_OK then 
7350: 74 68 65 20 78 73 6c 74 0a 74 72 61 6e 73 66 6f  the xslt.transfo
7360: 72 6d 61 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20  rmation will be 
7370: 61 62 6f 72 74 65 64 2c 20 72 65 74 75 72 6e 69  aborted, returni
7380: 6e 67 20 65 72 72 6f 72 2e 20 49 66 20 74 68 65  ng error. If the
7390: 20 63 61 6c 6c 65 64 20 73 63 72 69 70 74 0a 72   called script.r
73a0: 65 74 75 72 6e 73 20 2d 63 6f 64 65 20 62 72 65  eturns -code bre
73b0: 61 6b 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73  ak the error mes
73c0: 73 61 67 65 20 69 73 20 65 6d 70 74 79 2c 20 6f  sage is empty, o
73d0: 74 68 65 72 77 69 73 65 20 74 68 65 20 72 65 73  therwise the res
73e0: 75 6c 74 0a 63 6f 64 65 20 69 73 20 72 65 70 6f  ult.code is repo
73f0: 72 74 65 64 2e 20 49 6e 20 63 61 73 65 20 6f 66  rted. In case of
7400: 20 74 65 72 6d 69 6e 61 74 65 64 20 74 72 61 6e   terminated tran
7410: 73 66 6f 72 6d 61 74 69 6f 6e 20 74 68 65 20 6f  sformation the o
7420: 75 74 70 75 74 56 61 72 2c 0a 69 66 20 67 69 76  utputVar,.if giv
7430: 65 6e 2c 20 69 73 20 73 65 74 20 74 6f 20 74 68  en, is set to th
7440: 65 20 65 6d 70 74 79 20 73 74 72 69 6e 67 2e 3c  e empty string.<
7450: 2f 70 3e 0a 3c 2f 64 64 3e 0a 20 20 20 20 20 20  /p>.</dd>.      
7460: 0a 0a 20 20 20 20 20 20 0a 20 20 20 20 20 20 20  ..      .       
7470: 20 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 6d   <dt><i class="m
7480: 22 3e 40 61 74 74 72 4e 61 6d 65 3c 2f 69 3e 3c  ">@attrName</i><
7490: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
74a0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 76 61 6c  >Returns the val
74b0: 75 65 20 6f 66 20 74 68 65 20 61 74 74 72 69 62  ue of the attrib
74c0: 75 74 65 20 3c 69 20 63 6c 61 73 73 3d 22 6d 22  ute <i class="m"
74d0: 3e 61 74 74 72 4e 61 6d 65 3c 2f 69 3e 2e 20 20  >attrName</i>.  
74e0: 53 68 6f 72 74 20 63 75 74 0a 66 6f 72 20 3c 69  Short cut.for <i
74f0: 20 63 6c 61 73 73 3d 22 6d 22 3e 67 65 74 41 74   class="m">getAt
7500: 74 72 69 62 75 74 65 3c 2f 69 3e 2e 3c 2f 64 64  tribute</i>.</dd
7510: 3e 0a 20 20 20 20 20 20 0a 0a 20 20 20 20 20 20  >.      ..      
7520: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 0a 3c 62  .        <dt>.<b
7530: 20 63 6c 61 73 73 3d 22 6d 65 74 68 6f 64 22 3e   class="method">
7540: 6a 73 6f 6e 54 79 70 65 3c 2f 62 3e 20 3c 69 20  jsonType</b> <i 
7550: 63 6c 61 73 73 3d 22 6d 22 3e 3f 4f 42 4a 45 43  class="m">?OBJEC
7560: 54 7c 41 52 52 41 59 7c 4e 4f 4e 45 29 7c 28 53  T|ARRAY|NONE)|(S
7570: 54 52 49 4e 47 7c 4e 55 4d 42 45 52 7c 54 52 55  TRING|NUMBER|TRU
7580: 45 7c 46 41 4c 53 45 7c 4e 55 4c 4c 7c 4e 4f 4e  E|FALSE|NULL|NON
7590: 45 29 3f 3c 2f 69 3e 0a 3c 2f 64 74 3e 0a 20 20  E)?</i>.</dt>.  
75a0: 20 20 20 20 20 20 3c 64 64 3e 4f 6e 6c 79 20 65        <dd>Only e
75b0: 6c 65 6d 65 6e 74 20 61 6e 64 20 74 65 78 74 20  lement and text 
75c0: 6e 6f 64 65 73 20 6d 61 79 20 68 61 76 65 20 61  nodes may have a
75d0: 20 4a 53 4f 4e 20 74 79 70 65 20 61 6e 64 0a 20   JSON type and. 
75e0: 20 20 20 20 20 20 20 6f 6e 6c 79 20 74 68 69 73         only this
75f0: 20 74 79 70 65 73 20 6f 66 20 6e 6f 64 65 73 20   types of nodes 
7600: 73 75 70 70 6f 72 74 20 74 68 65 20 3c 69 20 63  support the <i c
7610: 6c 61 73 73 3d 22 6d 22 3e 6a 73 6f 6e 54 79 70  lass="m">jsonTyp
7620: 65 3c 2f 69 3e 20 6d 65 74 68 6f 64 3b 0a 20 20  e</i> method;.  
7630: 20 20 20 20 20 20 74 68 65 20 6f 74 68 65 72 20        the other 
7640: 6e 6f 64 65 20 74 79 70 65 73 20 72 65 74 75 72  node types retur
7650: 6e 20 65 72 72 6f 72 20 69 66 20 63 61 6c 6c 65  n error if calle
7660: 64 20 77 69 74 68 20 74 68 69 73 20 6d 65 74 68  d with this meth
7670: 6f 64 2e 0a 20 20 20 20 20 20 20 20 52 65 74 75  od..        Retu
7680: 72 6e 73 20 74 68 65 20 6a 73 6f 6e 54 79 70 65  rns the jsonType
7690: 20 6f 66 20 74 68 65 20 6e 6f 64 65 2e 20 49 66   of the node. If
76a0: 20 74 68 65 20 6f 70 74 69 6f 6e 61 6c 20 61 72   the optional ar
76b0: 67 75 6d 65 6e 74 20 69 73 0a 20 20 20 20 20 20  gument is.      
76c0: 20 20 67 69 76 65 6e 2c 20 74 68 65 20 4a 53 4f    given, the JSO
76d0: 4e 20 74 79 70 65 20 6f 66 20 74 68 65 20 6e 6f  N type of the no
76e0: 64 65 20 69 73 20 73 65 74 20 74 6f 20 74 68 65  de is set to the
76f0: 20 67 69 76 65 6e 20 74 79 70 65 20 61 6e 64 0a   given type and.
7700: 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 65 64          returned
7710: 2e 20 56 61 6c 69 64 20 74 79 70 65 20 61 72 67  . Valid type arg
7720: 75 6d 65 6e 74 73 20 66 6f 72 20 65 6c 65 6d 65  uments for eleme
7730: 6e 74 20 6e 6f 64 65 73 20 61 72 65 20 4f 42 4a  nt nodes are OBJ
7740: 45 43 54 2c 0a 20 20 20 20 20 20 20 20 41 52 52  ECT,.        ARR
7750: 41 59 20 61 6e 64 20 4e 4f 4e 45 2e 20 56 61 6c  AY and NONE. Val
7760: 69 64 20 74 79 70 65 20 61 72 67 75 6d 65 6e 74  id type argument
7770: 73 20 66 6f 72 20 74 65 78 74 20 6e 6f 64 65 73  s for text nodes
7780: 20 61 72 65 0a 20 20 20 20 20 20 20 20 53 54 52   are.        STR
7790: 49 4e 47 2c 20 4e 55 4d 42 45 52 2c 20 54 52 55  ING, NUMBER, TRU
77a0: 45 2c 20 46 41 4c 53 45 2c 20 4e 55 4c 4c 20 61  E, FALSE, NULL a
77b0: 6e 64 20 4e 4f 4e 45 2e 3c 2f 64 64 3e 0a 20 20  nd NONE.</dd>.  
77c0: 20 20 20 20 0a 0a 20 20 20 20 3c 2f 64 6c 3e 3c      ..    </dl><
77d0: 70 3e 4f 74 68 65 72 77 69 73 65 2c 20 69 66 20  p>Otherwise, if 
77e0: 61 6e 20 75 6e 6b 6e 6f 77 6e 20 6d 65 74 68 6f  an unknown metho
77f0: 64 20 6e 61 6d 65 20 69 73 20 67 69 76 65 6e 2c  d name is given,
7800: 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 77 69 74   the command wit
7810: 68 20 74 68 65 20 73 61 6d 65 0a 6e 61 6d 65 20  h the same.name 
7820: 61 73 20 74 68 65 20 67 69 76 65 6e 20 6d 65 74  as the given met
7830: 68 6f 64 20 77 69 74 68 69 6e 20 74 68 65 20 6e  hod within the n
7840: 61 6d 65 73 70 61 63 65 20 3c 74 74 20 63 6c 61  amespace <tt cla
7850: 73 73 3d 22 6c 22 3e 3a 3a 64 6f 6d 3a 3a 64 6f  ss="l">::dom::do
7860: 6d 4e 6f 64 65 3c 2f 74 74 3e 20 69 73 20 74 72  mNode</tt> is tr
7870: 69 65 64 20 74 6f 0a 62 65 20 65 78 65 63 75 74  ied to.be execut
7880: 65 64 2e 20 54 68 69 73 20 61 6c 6c 6f 77 73 20  ed. This allows 
7890: 71 75 69 63 6b 20 6d 65 74 68 6f 64 20 61 64 64  quick method add
78a0: 69 74 69 6f 6e 73 20 6f 6e 20 54 63 6c 20 6c 65  itions on Tcl le
78b0: 76 65 6c 2e 3c 2f 70 3e 0a 0a 0a 20 20 3c 68 32  vel.</p>...  <h2
78c0: 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 43 54 69 64  ><a name="SECTid
78d0: 30 78 35 36 31 65 38 32 65 62 62 66 34 30 22 3e  0x561e82ebbf40">
78e0: 53 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 68 32  SEE ALSO</a></h2
78f0: 3e 3c 70 20 63 6c 61 73 73 3d 22 73 65 65 61 6c  ><p class="seeal
7900: 73 6f 22 3e 64 6f 6d 2c 20 64 6f 6d 44 6f 63 3c  so">dom, domDoc<
7910: 2f 70 3e 0a 20 20 0a 20 20 3c 68 32 3e 3c 61 20  /p>.  .  <h2><a 
7920: 6e 61 6d 65 3d 22 53 45 43 54 69 64 30 78 35 36  name="SECTid0x56
7930: 31 65 38 32 65 62 63 32 64 30 22 3e 4b 45 59 57  1e82ebc2d0">KEYW
7940: 4f 52 44 53 3c 2f 61 3e 3c 2f 68 32 3e 3c 70 20  ORDS</a></h2><p 
7950: 63 6c 61 73 73 3d 22 6b 65 79 77 6f 72 64 73 22  class="keywords"
7960: 3e 0a 3c 61 20 63 6c 61 73 73 3d 22 6b 65 79 77  >.<a class="keyw
7970: 6f 72 64 22 20 68 72 65 66 3d 22 6b 65 79 77 6f  ord" href="keywo
7980: 72 64 2d 69 6e 64 65 78 2e 68 74 6d 6c 23 4b 57  rd-index.html#KW
7990: 2d 58 4d 4c 22 3e 58 4d 4c 3c 2f 61 3e 2c 20 3c  -XML">XML</a>, <
79a0: 61 20 63 6c 61 73 73 3d 22 6b 65 79 77 6f 72 64  a class="keyword
79b0: 22 20 68 72 65 66 3d 22 6b 65 79 77 6f 72 64 2d  " href="keyword-
79c0: 69 6e 64 65 78 2e 68 74 6d 6c 23 4b 57 2d 44 4f  index.html#KW-DO
79d0: 4d 22 3e 44 4f 4d 3c 2f 61 3e 2c 20 3c 61 20 63  M">DOM</a>, <a c
79e0: 6c 61 73 73 3d 22 6b 65 79 77 6f 72 64 22 20 68  lass="keyword" h
79f0: 72 65 66 3d 22 6b 65 79 77 6f 72 64 2d 69 6e 64  ref="keyword-ind
7a00: 65 78 2e 68 74 6d 6c 23 4b 57 2d 64 6f 63 75 6d  ex.html#KW-docum
7a10: 65 6e 74 22 3e 64 6f 63 75 6d 65 6e 74 3c 2f 61  ent">document</a
7a20: 3e 2c 20 3c 61 20 63 6c 61 73 73 3d 22 6b 65 79  >, <a class="key
7a30: 77 6f 72 64 22 20 68 72 65 66 3d 22 6b 65 79 77  word" href="keyw
7a40: 6f 72 64 2d 69 6e 64 65 78 2e 68 74 6d 6c 23 4b  ord-index.html#K
7a50: 57 2d 6e 6f 64 65 22 3e 6e 6f 64 65 3c 2f 61 3e  W-node">node</a>
7a60: 2c 20 3c 61 20 63 6c 61 73 73 3d 22 6b 65 79 77  , <a class="keyw
7a70: 6f 72 64 22 20 68 72 65 66 3d 22 6b 65 79 77 6f  ord" href="keywo
7a80: 72 64 2d 69 6e 64 65 78 2e 68 74 6d 6c 23 4b 57  rd-index.html#KW
7a90: 2d 70 61 72 73 69 6e 67 22 3e 70 61 72 73 69 6e  -parsing">parsin
7aa0: 67 3c 2f 61 3e 0a 3c 2f 70 3e 0a 20 20 0a 3c 2f  g</a>.</p>.  .</
7ab0: 64 69 76 3e 3c 68 72 20 63 6c 61 73 73 3d 22 6e  div><hr class="n
7ac0: 61 76 73 65 70 22 3e 3c 64 69 76 20 63 6c 61 73  avsep"><div clas
7ad0: 73 3d 22 6e 61 76 62 61 72 22 20 61 6c 69 67 6e  s="navbar" align
7ae0: 3d 22 63 65 6e 74 65 72 22 3e 0a 3c 61 20 63 6c  ="center">.<a cl
7af0: 61 73 73 3d 22 6e 61 76 61 69 64 22 20 68 72 65  ass="navaid" hre
7b00: 66 3d 22 69 6e 64 65 78 2e 68 74 6d 6c 22 3e 43  f="index.html">C
7b10: 6f 6e 74 65 6e 74 73 3c 2f 61 3e 20 c2 b7 20 3c  ontents</a> · <
7b20: 61 20 63 6c 61 73 73 3d 22 6e 61 76 61 69 64 22  a class="navaid"
7b30: 20 68 72 65 66 3d 22 63 61 74 65 67 6f 72 79 2d   href="category-
7b40: 69 6e 64 65 78 2e 68 74 6d 6c 22 3e 49 6e 64 65  index.html">Inde
7b50: 78 3c 2f 61 3e 20 c2 b7 20 3c 61 20 63 6c 61 73  x</a> · <a clas
7b60: 73 3d 22 6e 61 76 61 69 64 22 20 68 72 65 66 3d  s="navaid" href=
7b70: 22 6b 65 79 77 6f 72 64 2d 69 6e 64 65 78 2e 68  "keyword-index.h
7b80: 74 6d 6c 22 3e 4b 65 79 77 6f 72 64 73 3c 2f 61  tml">Keywords</a
7b90: 3e 20 c2 b7 20 3c 61 20 63 6c 61 73 73 3d 22 6e  > · <a class="n
7ba0: 61 76 61 69 64 22 20 68 72 65 66 3d 22 68 74 74  avaid" href="htt
7bb0: 70 3a 2f 2f 74 64 6f 6d 2e 6f 72 67 22 3e 52 65  p://tdom.org">Re
7bc0: 70 6f 73 69 74 6f 72 79 3c 2f 61 3e 0a 3c 2f 64  pository</a>.</d
7bd0: 69 76 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74  iv>.</body>.</ht
7be0: 6d 6c 3e 0a                                      ml>.