#lappend auto_path {E:\TEMP\tcl\tdom0.8.2} lappend auto_path ~/tcl/tdom/bin package require tdom set f [open "po.xml" r]; set xml [read $f]; close $f set doc [dom parse $xml] set e1 [$doc documentElement] $doc asXML set e2 [$doc createElement "qqq1"] set e3 [$doc createElement "qqq1"] $e1 appendChild $e2 $e1 appendChild $e3 $e1 appendChild $e3 $doc asXML # xpath w tdom # set l1 [$doc selectNodes {//*[@country]}] [lindex $l1 0] nodeName #% shipTo [lindex $l1 1] nodeName #% billTo