I've used XML::Parser to output as a Tree, now assuming: $$tree[1]->[4]->[0]->{"name"};
gives me the name of a category and
$$tree[1]->[8]->[0]->{"name"};
gives me the name of the next category, how would I go about traversing my tree so I can do a foreach on each category?
The actual data I want is pulled out along the lines of
$$tree[1]->[4]->[4]->[4]->[24]->[2];
but obviously this will only do it for a single category and I need to iterate over all of them.
I was introduced to map a couple of weeks ago on a much simpler question, but I cant see how that would do the trick here. Any suggestions?
Cheers
But why not use XML::XPath [search.cpan.org] or XML::TreeBuilder [search.cpan.org]?
Andreas
I was hoping you might drop by. I have used a bit of XPath before so it could be a good bet, although I haven't used it in Perl, whats the module like to use?
I am going to be working with some pretty large xml documents - will it handle these OK. I haven't come across TreeBuilder before so I will take a look at it now.
Thanks