Problems using XML::Twig

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skrishnaveni
    New Member
    • Jan 2007
    • 4

    Problems using XML::Twig

    Hi,

    Suppose there is an xml with the following format:

    <people>
    <name1>
    <address1>abc </address1>
    <city1>abc</city1>
    </name1>
    <name2>
    <address2>abc </address2>
    <city2>abc</city2>
    </name2>
    </people>

    and I want to use the twig parser as:
    my $t= XML::Twig->new( twig_handlers =>
    { 'people' => \&section,
    },
    );
    $t->parsefile( 'doc.xml');

    If I define a function called section, then how I can access all children of all names manually.
Working...