The QtSoapNamespaces class provides a registry for XML namespaces and prefixes for use in QtSoap. More...
#include <QtSoapNamespaces>
QString | prefixFor ( const QString & uri ) |
void | registerNamespace ( const QString & prefix, const QString & uri ) |
QtSoapNamespaces & | instance () |
The QtSoapNamespaces class provides a registry for XML namespaces and prefixes for use in QtSoap.
When a QtSoapMessage is converted to XML via QtSoapMessage::toXmlString(), this class is used to find appropriate XML namespace prefixes for the QNames (qualified names) in the message.
To register a namespace with a prefix, call register(). prefixFor() will then return the prefix that is registered for the given namespace, if any.
To access the QtSoapNamespaces registry, call QtSoapNamespaces::instance().
QtSoapNamespaces ®istry = QtSoapNamespaces::instance(); registry.register("pre", "http://www.example.com/"); QString prefix = registry.prefixFor("http://www.example.com/"); // returns "pre"
See also QtSoapMessage.
Returns a reference to the QtSoapNamespaces singleton.
Returns the prefix for the namespace uri, or an empty string if no prefix has been registered for uri.
Registers the namespace uri with the prefix prefix.