xmltooling  1.4.2
xmltooling::QName Class Reference

A data structure for encapsulating XML QNames. More...

#include <xmltooling/QName.h>

Public Member Functions

 QName (const XMLCh *uri=0, const XMLCh *localPart=0, const XMLCh *prefix=0)
 Constructor. More...
 
 QName (const char *uri, const char *localPart, const char *prefix=0)
 Constructor. More...
 
bool hasPrefix () const
 Indicates whether the QName has a prefix. More...
 
bool hasNamespaceURI () const
 Indicates whether the QName has a non-empty namespace. More...
 
bool hasLocalPart () const
 Indicates whether the QName has a non-empty local name. More...
 
const XMLCh * getPrefix () const
 Returns the namespace prefix. More...
 
const XMLCh * getNamespaceURI () const
 Returns the namespace URI. More...
 
const XMLCh * getLocalPart () const
 Returns the local part of the name. More...
 
void setPrefix (const XMLCh *prefix)
 Sets the namespace prefix. More...
 
void setNamespaceURI (const XMLCh *uri)
 Sets the namespace URI. More...
 
void setLocalPart (const XMLCh *localPart)
 Sets the local part of the name. More...
 
void setPrefix (const char *prefix)
 Sets the namespace prefix. More...
 
void setNamespaceURI (const char *uri)
 Sets the namespace URI. More...
 
void setLocalPart (const char *localPart)
 Sets the local part of the name. More...
 
std::string toString () const
 Gets a string representation of the QName for logging, etc. More...
 

Detailed Description

A data structure for encapsulating XML QNames.

The Xerces class is too limited to use at the moment.

Constructor & Destructor Documentation

xmltooling::QName::QName ( const XMLCh *  uri = 0,
const XMLCh *  localPart = 0,
const XMLCh *  prefix = 0 
)

Constructor.

Parameters
urinamespace URI
localPartlocal name
prefixnamespace prefix (without the colon)
xmltooling::QName::QName ( const char *  uri,
const char *  localPart,
const char *  prefix = 0 
)

Constructor.

Parameters
urinamespace URI
localPartlocal name
prefixnamespace prefix (without the colon)

Member Function Documentation

const XMLCh* xmltooling::QName::getLocalPart ( ) const
inline

Returns the local part of the name.

Returns
Null-terminated Unicode string containing the local name
const XMLCh* xmltooling::QName::getNamespaceURI ( ) const
inline

Returns the namespace URI.

Returns
Null-terminated Unicode string containing the URI
const XMLCh* xmltooling::QName::getPrefix ( ) const
inline

Returns the namespace prefix.

Returns
Null-terminated Unicode string containing the prefix, without the colon
bool xmltooling::QName::hasLocalPart ( ) const
inline

Indicates whether the QName has a non-empty local name.

Returns
true iff the local name is non-empty
bool xmltooling::QName::hasNamespaceURI ( ) const
inline

Indicates whether the QName has a non-empty namespace.

Returns
true iff the namespace is non-empty
bool xmltooling::QName::hasPrefix ( ) const
inline

Indicates whether the QName has a prefix.

Returns
true iff the prefix is non-empty
void xmltooling::QName::setLocalPart ( const XMLCh *  localPart)

Sets the local part of the name.

Parameters
localPartNull-terminated Unicode string containing the local name
void xmltooling::QName::setLocalPart ( const char *  localPart)

Sets the local part of the name.

Parameters
localPartNull-terminated ASCII string containing the local name
void xmltooling::QName::setNamespaceURI ( const XMLCh *  uri)

Sets the namespace URI.

Parameters
uriNull-terminated Unicode string containing the URI
void xmltooling::QName::setNamespaceURI ( const char *  uri)

Sets the namespace URI.

Parameters
uriNull-terminated ASCII string containing the URI
void xmltooling::QName::setPrefix ( const XMLCh *  prefix)

Sets the namespace prefix.

Parameters
prefixNull-terminated Unicode string containing the prefix, without the colon
void xmltooling::QName::setPrefix ( const char *  prefix)

Sets the namespace prefix.

Parameters
prefixNull-terminated ASCII string containing the prefix, without the colon
std::string xmltooling::QName::toString ( ) const

Gets a string representation of the QName for logging, etc.

Format is prefix:localPart or {namespaceURI}localPart if no prefix.

Returns
the string representation

The documentation for this class was generated from the following file: