=head1 NAME

XML::LibXML::Element - The DOM Element Class

=head1 SYNOPSIS

  use XML::LibXML::Element;

  $node = XML::LibXML::Element->new( $name )
  $node->setAttribute( $aname, $avalue );
  $node->setAttributeNS( $nsURI, $aname, $avalue );
  $avalue = $node->getAttribute( $aname );
  $avalue = $node->setAttributeNS( $nsURI, $aname );
  $attrnode = $node->getAttributeNode( $aname );
  $attrnode = $node->getAttributeNodeNS( $namespaceURI, $aname );
  $node->removeAttribute( $aname );
  $node->removeAttributeNS( $nsURI, $aname );
  $boolean = $node->hasAttribute( $aname );
  $boolean = $node->hasAttributeNS( $nsURI, $aname );
  @nodes = $node->getChildrenByTagName($tagname);
  @nodes = $node->getChildrenByTagNameNS($nsURI,$tagname);
  @nodes = $node->getElementsByTagName($tagname);
  @nodes = $node->getElementsByTagNameNS($nsURI,$localname);
  @nodes = $node->getElementsByLocalName($localname);
  $node->appendWellBalancedChunk( $chunk )
  $node->appendText( $PCDATA );
  $node->appendTextNode( $PCDATA );
  $node->appendTextChild( $childname , $PCDATA )

=head1 DESCRIPTION



=head2 Methods

=over 4

=item B<new>

This function creates a new node unbound to any DOM.

=item B<setAttribute>

This method sets or replaces the node's attribute I<$aname> to the value I<$avalue>

=item B<setAttributeNS>

Namespaceversion of I<setAttribute> .

=item B<getAttribute>

If I<$node> has an attribute with the name I<$aname> ,
the value of this attribute will get returned.

=item B<getAttributeNS>

Namespaceversion of I<getAttribute> .

=item B<getAttributeNode>

Returns the attribute as a node if the attribute exists. If the
Attribute does not exists I<undef> will be returned.

=item B<getAttributeNodeNS>

Namespaceversion of I<getAttributeNode> .

=item B<removeAttribute>

The method removes the attribute I<$aname> from the node's
attribute list, if the attribute can be found.

=item B<removeAttributeNS>

Namespace version of I<removeAttribute>

=item B<hasAttribute>

This funcion tests if the named attribute is set for the node. If
the attribute is specified, TRUE (1) will be returned, otherwise
the returnvalue is FALSE (0).

=item B<hasAttributeNS>

namespace version of I<hasAttribute>

=item B<getChildrenByTagName>

The function gives direct access to all childnodes of the current
node with the same tagname. It makes things a lot easier if you
need to handle big datasets.
If this function is called in SCALAR context, it returns the number of Elements found.

=item B<getChildrenByTagNameNS>

Namespace version of I<getChildrenByTagName> .
If this function is called in SCALAR context, it returns the number of Elements found.

=item B<getElementsByTagName>

This function is part of the
spec it fetches all descendants of a node with a given tagname. If one
is as confused with I<tagname> as I was, tagname is a qualified
tagname which is in case of namespace useage prefix and local name
In SCALAR context this function returns a I<XML::LibXML::NodeList> object.

=item B<getElementsByTagNameNS>

Namespace version of I<getElementsByTagName> as found in the DOM spec.
In SCALAR context this function returns a I<XML::LibXML::NodeList> object.

=item B<getElementsByLocalName>

This function is not found in the DOM specification. It is a mix of
getElementsByTagName and getElementsByTagNameNS. It will fetch all tags matching the given local-name. This alows one to select tags with the same local name across namespace borders. In SCALAR context this function returns a I<XML::LibXML::NodeList> object.

=item B<appendWellBalancedChunk>

Sometimes it is nessecary to append a string coded XML Tree to a node. B<appendWellBalancedChunk> will do the trick for you.
But this is only done if the String is I<well-balanced> .

=item B<appendText>

alias for appendTextNode().

=item B<appendTextNode>

This wrapper function lets you add a string directly to an element
node.

=item B<appendTextChild>

Somewhat similar with I<appendTextNode> : It lets you set an
Element, that contains only a I<text node> directly by
specifying the name and the text content.

=back

=head1 SEE ALSO

XML::LibXML, XML::LibXML::Node, XML::LibXML::Document, XML::LibXML::Attr, XML::LibXML::Text, XML::LibXML::Comment, XML::LibXML::DocumentFragment

=head1 VERSION

0.95

