in reply to XML::Twig and Processing Instructions
By default the PIs are "hidden" in the text (in fact the text of the element doesn't even include the PI). In order to get 3 children, you need to use the pi => 'process' option when you create the XML::Twig object. See the pi option doc. You can then even set a handler on the PIs
In Section
Seekers of Perl Wisdom