Help for this page

Select Code to Download


  1. or download this
        # Strip namespace from child tags. Set default namespace, let
        # child tags inherit from it.  So ghetto that we even have to do t
    +his
        # and LibXML can't on its own.
    ...
            $str =~ s/<entry>/<entry xmlns="$ns">/ if $opts->{'single_entr
    +y'};
            return $str;
        };
    
  2. or download this
    my $root = $doc->documentElement;
    my $xpc = XML::LibXML::XPathContext->new($html);
    $xpc->registerNs('x', 'http://www.w3.org/1999/xhtml');
    my $htmls = $xpc->find('/x:html', $doc);