From: Cedric M. <ced...@ag...> - 2004-11-19 16:09:10
|
Hi, I am a user of tcl/tk and vtk. I want to use tclxml in to parse xml fil= es and extract values of tags, I have an XML file like this: test.xml: <?xml version=3D'1.0'?> <Hello>145590</Hello> What I have to do if I want to parse this document and the tag Hello is= in th xml, I want to get the value ? proc toto {Hello tata} { global amax f set amax $tata $f.labela configure -text "a=3D$amax" $f.valuea configure -textvariable $amax } set filein [open "./test.xml" r] set parser [::xml::parser -elementstartcommand toto] $parser parse [read $filein] Thank you in advance, C=E9dric, Dr, Phd, Marie Curie Fellow, post doctorate VICTOR project Agfa Gevaert, RDM/Physics & Analytics + 32 (0) 3 444 3077, ced...@ag... http://www.marchessoux.com= |