Hello Robert, thanks for the answer. � (At) 07:54 -0600 28/10/02, Robert Dalgleish �crivait (wrote) :
1) The start of an HTML document is spelled <html> (nit).
Oups, typo...
2) What is happening is you are "walking the tree" depth first. However, you are visiting the branches and nodes further down the tree *before* you are reaching the closing tag of superior branches. Hence, you reach the </folder> tag *after* you have already appended the contents of the bookmarks to the output string. The documentation clearly states "The subroutine that will be called everytime an element with that name has been completely parsed."
Ok, I missed that.
3) Because of the above, you may want to defer printing <bookmark> elements entirely, or simply transforming a bookmark into an <a> element. Then, when you reach the <folder> completion, just print the contents of the element.
Hmm, I'm not sure if I understand you well. The problem is that I have to deal also with nested <folder> inside <folder>. I guess, I have to dig more the XML::Twig doc. Anyway, I have also send my problem to the perl-xml list where I know the author of XML::Twig is subscribed. <http://aspn.activestate.com/ASPN/Mail/Message/perl-xml/1412448> Thanks for your help. Cheers -Emmanuel -- ______________________________________________________________________ Emmanuel D�carie / Programmation pour le Web - Programming for the Web Frontier - Perl - PHP - Javascript - XML <http://scriptdigital.com/>
