Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

Namespace Class Reference

A Namespace element (Node) of an XML document. More...

#include <cxxtools/xml/namespace.h>

List of all members.

Public Member Functions

 Namespace (const String &namespaceURI, const String &prefix)
 Constructs a new Namespace object with the given namespace URI and prefix.
 ~Namespace ()
 Empty destructor.
const Stringprefix () const
 Returns the prefix of this namespace.
void setPrefix (const String &prefix)
 Sets the prefix of this namespace.
const StringnamespaceUri () const
 Returns the URI of this namespace.
void setNamespaceUri (const String &namespaceUri)
 Sets the URI of this namespace.
bool isDefaultNamespaceDeclaration ()
 Returns $true$ if this is the default namespace in the current XML document. Otherwise $false$ is returned.


Detailed Description

A namespace element stores a namespace uri which describes the namespace URI and a locally usable prefix which can be added before a tag name to specify that this particular tag is part of that namespace.

Use namespaceUri() to get the namespace URI. Use prefix() to get the prefix.

See also:
Node

NamespaceContext


Constructor & Destructor Documentation

Namespace ( const String namespaceURI,
const String prefix 
)

Parameters:
namespaceURI The unique URI of this namespace.
prefix The namespace prefix which can be added to a tag name to specify that this tag belongs to that namespace.


Member Function Documentation

const String& prefix (  )  const

The namespace prefix can be added to a tag name to specify that this tag belongs to that namespace.

Returns:
The namespace prefix of this Namespace object.

void setPrefix ( const String prefix  ) 

The namespace prefix can be added to a tag name to specify that this tag belongs to that namespace.

Parameters:
prefix The namespace prefix for this Namespace object.

const String& namespaceUri (  )  const

The URI is unique and identifies the namespace.

Returns:
The namespace URI of this Namespace object.

void setNamespaceUri ( const String namespaceUri  ) 

The URI is unique and identifies the namespace.

Parameters:
namespaceUri The namespace URI for this Namespace object.

bool isDefaultNamespaceDeclaration (  ) 

Returns:
$true$ if this is the default namespace; $false$ otherwise.

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6