xmltooling::QName Class Reference
A data structure for encapsulating XML QNames.
More...
#include <xmltooling/QName.h>
List of all members.
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
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) |
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
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 char * |
localPart |
) |
|
Sets the local part of the name.
- Parameters:
-
| localPart | Null-terminated ASCII string containing the local name |
void xmltooling::QName::setLocalPart |
( |
const XMLCh * |
localPart |
) |
|
Sets the local part of the name.
- Parameters:
-
| localPart | Null-terminated Unicode string containing the local name |
void xmltooling::QName::setNamespaceURI |
( |
const char * |
uri |
) |
|
Sets the namespace URI.
- Parameters:
-
| uri | Null-terminated ASCII string containing the URI |
void xmltooling::QName::setNamespaceURI |
( |
const XMLCh * |
uri |
) |
|
Sets the namespace URI.
- Parameters:
-
| uri | Null-terminated Unicode string containing the URI |
void xmltooling::QName::setPrefix |
( |
const char * |
prefix |
) |
|
Sets the namespace prefix.
- Parameters:
-
| prefix | Null-terminated ASCII string containing the prefix, without the colon |
void xmltooling::QName::setPrefix |
( |
const XMLCh * |
prefix |
) |
|
Sets the namespace prefix.
- Parameters:
-
| prefix | Null-terminated Unicode 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: