The piece of code that I use to get the attributes is as follows:
set doc [dom parse $xmloutput]
set root [$doc documentElement]
set jobNumberList [$root selectNodes
/job_info/queue_info/job_list/JB_job_number/text()]
for {set ind 0} {$ind < 70 } {incr ind 1} {
set node [lindex $jobNumberList $ind]
set xml(job$ind,jobNumber) [$node nodeValue]
Where the xmloutput is from the output of a program.
Then I set up a for loop which goes through and extracts each job id,
however, despite the xml having over 500 entries, I always get only 70
job ids.
The error I get if I try to read more than 70 is:
----------------------------------------------------------------
TCL Error
invalid command name ""
invalid command name ""
while executing
"$node nodeValue"
(procedure "test_issue123" line 35)
invoked from within
"$elem"
----------------------------------------------------------------
Any help would be greatly appreciated.
Thanks,
Michal
--- In tdom@yahoogroups.com, rolf@... wrote:
>
>
> On 21 Aug, mnovak222 wrote:
> > Does anyone know of any limitations that tdom has?
>
> Sure it has. The most obvious (not the only) is, that you need enough
> memory, to hold the DOM tree in memory.
>
> But you don't hit any of them so easy, that's very probably not your
> problem.
>
> > I am trying to parse some xml data that has 500 elements but whenever
> > I create a list using selectNodes, it always only returns the first 70
> > elements and no more.
> > Is this some known limitation, or it possible I am doing something
wrong?
>
> You do something wrong. There's no problem at all with XPath
> expressions returning thousands and thousands of nodes.
>
> I bet, your XPath expression does not, what you want it to do. If you
> show it us and explain, what you want it to do, we probably could
> help.
>
> rolf
>