|
From: Mats B. <ma...@pr...> - 2002-12-12 13:53:57
|
Update:
I just tested this once again with a slightly modified callback,
which shows that there are no extra newlines; it's just a callback
with a completely empty (nothing) cdata. It's the newline of the
puts we have seen.
See script below and verbatim output from the same script.
/Mats
package require xml
proc cdata {data args} {
puts "(data)==>'$data'"
}
set parser [::xml::parser parseit \
-characterdatacommand cdata -final 0]
$parser parse "<the>"
$parser parse "world"
$parser parse "</the>"
From cvs Dec 10, but without patch #596959
(I still used a hacked up pkgIndex.tcl file, therefore 3.0):
% package require xml
3.0
(Build) 2 %
(Build) 3 % proc cdata {data args} {
> puts "(data)==>'$data'"
> }
(Build) 4 % set parser [::xml::parser parseit \
> -characterdatacommand cdata -final 0]
parseit
(Build) 5 %
(Build) 6 % $parser parse "<the>"
(data)==>''
(Build) 7 % $parser parse "world"
(data)==>'world'
(Build) 8 % $parser parse "</the>"
(data)==>''
|