Posted to tcl by de at Thu Feb 12 19:09:55 GMT 2015view raw

  1. package require tdom
  2. set xml {<test xmlns="URI"/>}
  3. set doc [dom parse $xml]
  4. set root [$doc documentElement]
  5. set newNode [$doc createElementNS URI item]
  6. $root appendChild $newNode
  7. puts [$doc asXML]
  8.