Scroll to navigation

HTML::TreeBuilder::LibXML::Node(3pm) User Contributed Perl Documentation HTML::TreeBuilder::LibXML::Node(3pm)
 

NAME

HTML::TreeBuilder::LibXML::Node - HTML::Element compatible API for HTML::TreeBuilder::LibXML

SYNOPSIS

  my $value = $node->attr('name');
  my $string = $node->string_value;
  my $text   = $node->as_text;
  my $t_text = $node->as_trimmed_text;
  my $xml    = $node->as_XML;
  my $html   = $node->as_HTML;
  my $tag    = $node->tag;
  my $id     = $node->id;
  my $clone  = $node->clone;
  $node->delete;
  my $prev_sib = $node->left;
  my $next_sib = $node->right;
  $node->look_down(@args);
  my %attr     = $node->all_attr;
  my %attr     = $node->all_external_attr;
  my @names    = $node->all_attr_names;
  my @names    = $node->all_external_attr_names;
  my @elements = $node->find($elem_name);
  my @child_nodes = $node->content_list;
  my $parent = $node->parent;
  my $old_parent = $node->detach;
  $node->postinsert($element_or_text, ...);
  $node->preinsert($element_or_text, ...);
  $node->push_content($element_or_text, ...);
  $node->unshift_content($element_or_text, ...);
  $node->replace_with($element_or_text, ...);
  
  my @clones = HTML::TreeBuilder::LibXML::Node->clone_list(@nodes);
  # HTML::TreeBuilder::XPath
  my @nodes  = $node->find($xpath)
  my @nodes  = $node->findnodes($xpath);
  my $value  = $node->findvalue($xpath);
  my @values = $node->findvalues($xpath);
  $node->isTextNode;
  my $child = $node->getFirstChild;
  my $bool  = $node->exists($xpath);
  my $bool  = $node->matches($xpath);
  my $value  = $node->findnodes_as_string($xpath);
  my @values = $node->findnodes_as_strings($xpath);
2013-07-17 perl v5.14.2