in reply to XML::Twig and paste
The problem is in the loop: the first element is the root. The you get the next element, the tag element, which you print. Its content is <tag>content</tag>, then you take the next element: this one is the text (#PCDATA') element in the tag element, and you print it. Its content is content. Then you take the next element, there is none and you exit.
So paste works, its just your understanding of next_element and print that was off.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML::Twig and paste
by jezzica85 (Initiate) on Jul 25, 2007 at 16:41 UTC | |
by mirod (Canon) on Jul 25, 2007 at 16:56 UTC | |
by jezzica85 (Initiate) on Jul 25, 2007 at 17:24 UTC | |
by mirod (Canon) on Jul 25, 2007 at 18:02 UTC | |
by jezzica85 (Initiate) on Jul 25, 2007 at 18:26 UTC |