# Poco::XML

# class QName

Library: XML
Package: XML
Header: Poco/XML/QName.h

## Description

This class represents a qualified XML name in the stream parser.

Note that the optional prefix is just a "syntactic sugar". In particular, it is ignored by the comparison operators and the std::ostream insertion operator.

## Member Summary

Member Functions: localName, namespaceURI, operator =, prefix, swap, toString

## Constructors

### QName

QName();

### QName

QName(
const std::string & name
);

### QName

QName(
const QName & qname
);

### QName

QName(
QName && qname
) noexcept;

### QName

QName(
const std::string & ns,
const std::string & name
);

### QName

QName(
const std::string & ns,
const std::string & name,
const std::string & prefix
);

## Member Functions

### localName

const std::string & localName() const;

Returns the local part of the name.

### localName

std::string & localName();

Returns the local part of the name.

### namespaceURI

const std::string & namespaceURI() const;

Returns the namespace URI part of the name.

### namespaceURI

std::string & namespaceURI();

Returns the namespace URI part of the name.

### operator =

QName & operator = (
const QName & qname
);

### operator =

QName & operator = (
QName && qname
) noexcept;

### prefix

const std::string & prefix() const;

Returns the namespace prefix of the name.

### prefix

std::string & prefix();

Returns the namespace prefix of the name.

### swap

void swap(
QName & qname
) noexcept;

### toString

std::string toString() const;

Returns a printable representation in the [<namespace>#]<name> form.