xmltooling 3.2.4

Public Member Functions | List of all members
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.
| QName (const char *uri, const char *localPart, const char *prefix=0)
| Constructor.
bool | hasPrefix () const
| Indicates whether the QName has a prefix.
bool | hasNamespaceURI () const
| Indicates whether the QName has a non-empty namespace.
bool | hasLocalPart () const
| Indicates whether the QName has a non-empty local name.
const XMLCh * | getPrefix () const
| Returns the namespace prefix.
const XMLCh * | getNamespaceURI () const
| Returns the namespace URI.
const XMLCh * | getLocalPart () const
| Returns the local part of the name.
void | setPrefix (const XMLCh *prefix)
| Sets the namespace prefix.
void | setNamespaceURI (const XMLCh *uri)
| Sets the namespace URI.
void | setLocalPart (const XMLCh *localPart)
| Sets the local part of the name.
void | setPrefix (const char *prefix)
| Sets the namespace prefix.
void | setNamespaceURI (const char *uri)
| Sets the namespace URI.
void | setLocalPart (const char *localPart)
| Sets the local part of the name.
std::string | toString () const
| Gets a string representation of the QName for logging, etc.

## Detailed Description

A data structure for encapsulating XML QNames.

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

## Constructor & Destructor Documentation

## ◆ QName() [1/2]

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

Constructor.

Parameters

  uri | namespace URI
  localPart | local name
  prefix | namespace prefix (without the colon)

## ◆ QName() [2/2]

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

Constructor.

Parameters

  uri | namespace URI
  localPart | local name
  prefix | namespace prefix (without the colon)

## Member Function Documentation

## ◆ getLocalPart()

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

Returns the local part of the name.

Returns
  Null-terminated Unicode string containing the local name

## ◆ getNamespaceURI()

const XMLCh * xmltooling::QName::getNamespaceURI | ( |  | ) | const
| inline

Returns the namespace URI.

Returns
  Null-terminated Unicode string containing the URI

## ◆ getPrefix()

const XMLCh * xmltooling::QName::getPrefix | ( |  | ) | const
| inline

Returns the namespace prefix.

Returns
  Null-terminated Unicode string containing the prefix, without the colon

## ◆ hasLocalPart()

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

## ◆ hasNamespaceURI()

bool xmltooling::QName::hasNamespaceURI | ( |  | ) | const
| inline

Indicates whether the QName has a non-empty namespace.

Returns
  true iff the namespace is non-empty

## ◆ hasPrefix()

bool xmltooling::QName::hasPrefix | ( |  | ) | const
| inline

Indicates whether the QName has a prefix.

Returns
  true iff the prefix is non-empty

## ◆ setLocalPart() [1/2]

void xmltooling::QName::setLocalPart | ( | const char * | localPart | ) |

Sets the local part of the name.

Parameters

  localPart | Null-terminated ASCII string containing the local name

## ◆ setLocalPart() [2/2]

void xmltooling::QName::setLocalPart | ( | const XMLCh * | localPart | ) |

Sets the local part of the name.

Parameters

  localPart | Null-terminated Unicode string containing the local name

## ◆ setNamespaceURI() [1/2]

void xmltooling::QName::setNamespaceURI | ( | const char * | uri | ) |

Sets the namespace URI.

Parameters

  uri | Null-terminated ASCII string containing the URI

## ◆ setNamespaceURI() [2/2]

void xmltooling::QName::setNamespaceURI | ( | const XMLCh * | uri | ) |

Sets the namespace URI.

Parameters

  uri | Null-terminated Unicode string containing the URI

## ◆ setPrefix() [1/2]

void xmltooling::QName::setPrefix | ( | const char * | prefix | ) |

Sets the namespace prefix.

Parameters

  prefix | Null-terminated ASCII string containing the prefix, without the colon

## ◆ setPrefix() [2/2]

void xmltooling::QName::setPrefix | ( | const XMLCh * | prefix | ) |

Sets the namespace prefix.

Parameters

  prefix | Null-terminated Unicode string containing the prefix, without the colon

## ◆ toString()

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:

- xmltooling/QName.h