There are 2 ways to do this: you can take the text of the first text element of the root: $twig->root->first_child( "#TEXT")->text, or you can simply use the text_only method: $twig->root->text_only.
In both case you might need to trim the result from the extra spaces you get, which in the first option can be done simply by writing $twig->root->first_child( "#TEXT")->trimmed_text
In reply to Re: XML::Twig text issue
by mirod
in thread XML::Twig text issue
by fredsnertz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |