Help for this page

Select Code to Download


  1. or download this
    my $t= parse XML::Twig::Elt(\*DATA);
    $t->sort_children( sub {
    ...
        return $top . $kid;
    });
    $_->print for $t->children;
    
  2. or download this
    <parent attribute="info1"><Child10><childinfo Number="1" attrib2="info
    +3"/></Child10></parent>
    <parent attribute="info1"><Child12><childinfo Number="1" attrib2="info
    +3"/></Child12></parent>
    ...
    <parent attribute="info3"><Child1><childinfo Number="3" attrib2="info3
    +"/></Child1></parent>
    <parent attribute="info4"><Child1><childinfo Number="4" attrib2="info3
    +"/></Child1></parent>
    <parent attribute="info5"><Child7><childinfo Number="5" attrib2="info3
    +"/></Child7></parent>
    
  3. or download this
    my $t= parse XML::Twig::Elt(\*DATA);
    $t->sort_children( sub {
    ...
        return $top . $kid;
    });
    $_->print for $t->children;
    
  4. or download this
    <parent attribute="info1"><Child2><childinfo Number="1" attrib2="info3
    +"/></Child2></parent>
    <parent attribute="info1"><Child3><childinfo Number="1" attrib2="info3
    +"/></Child3></parent>
    ...
    <parent attribute="info3"><Child1><childinfo Number="3" attrib2="info3
    +"/></Child1></parent>
    <parent attribute="info4"><Child1><childinfo Number="4" attrib2="info3
    +"/></Child1></parent>
    <parent attribute="info5"><Child7><childinfo Number="5" attrib2="info3
    +"/></Child7></parent>