From: <tim...@as...> - 2002-03-05 16:32:20
|
Kala, I believe XML requires you to have one "root" tag -- ie the outermost tag. Your modified example has two. Try placing the <another> tag just after the <Inner> tag and see what happens. I've been reading "Beginning XML 2nd Edition (XML Schemas, SOAP, XSLT, DOM, and SAX 2.0" From WROX Press and find it to be a pretty good tutorial on XML and related technologies. Kala Veda wrote: > Hi, > > Thanks a lot for your time. > I have some more doubts. In the script using TCLXML, variable > $xml is parsed to the parser object. Can this $xml be an xml file > name? Or should it be a string. I tried to run the script by defining > the $xml variable with different options, > > set xml "<Outer><Inner> Testing </Inner></Outer>" > > I am able to retrieve the Inner tag value without any problem, > but if i add another tag to the same string, say, > > set xml "<Outer><Inner> Testing > </Inner></Outer><Another>AnotherTag</Another>" > > then, i am getting an error as follows : > > emch-sp22-ultra# tclsh8.3 test2.tcl > error "junk after document element" at line 1 character 91 > while executing > "$p parse $xml" > (file "test2.tcl" line 35) > emch-sp22-ultra# -- Tim Davis |