namespace(3)

NAME

XML::LibXML::Namespace - A Namespace Class to hold names
pace nodes
synopsis
use XML::LibXML
my $ns = XML::LibXML::Namespace->new($nsURI);
print $ns->getName()
print $ns->name()
print $ns->prefix()
$localname = $ns->getLocalName()
print $ns->getData()
print $ns->getValue()
print $ns->value()
print $ns->uri()
$known_uri = $ns->getNamespaceURI()
$known_prefix = $ns->getPredix()

DESCRIPTION

Namespace nodes are returned by both $element->find
nodes('namespace::foo') or by $node->getNamespaces().

The namespace node API is not part of any current DOM API,
and so it is quite minimal. It should be noted that names
pace nodes are not a sub class of XML::LibXML::Node, how
ever Namespace nodes act a lot like attribute nodes, and
similarly named methods will return what you would expect
if you treated the namespace node as an attribute.

Methods

new Creates a new Namespace node. Note that this is not a
'node' as an attribute or an element node. Therefore
you can't do call all XML::LibXML::Node Functions. All
functions available for this node are listed below.
optionally you can pass the prefix to the namespace
constructor. If this second parameter is ommited you
will create a so called default namespace. Note, the
newly created namespace is not bound to any docuement
or node, therefore you should not expect it to be
available in an existing document.
getName
Returns "xmlns:prefix", where prefix is the prefix for
this namespace.
name
Alias for getName()
prefix
Returns the prefix bound to this namespace declara
tion.
getLocalName
Alias for prefix()
getData
Returns the URI of the namespace.
getValue
Alias for getData()
value
Alias for getData()
uri Alias for getData()
getNamespaceURI
Returns the string "http://www.w3.org/2000/xmlns/"
getPrefix
Returns the string "xmlns"

AUTHOR

Matt Sergeant, Christian Glahn

VERSION

1.53
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout