next up previous contents
Next: OPC Item Properties Up: Representation of OPC XML-DA Previous: The ItemContainer Object   Contents

Qualified Names (QNames) and Namespaces

The OPC XML-DA specification and its associated SOAP messages sometimes contain Qualified Names (QNames). QNames consist of a namespace, most often in the form of an Uniform Resource Locator (URL) and a name. For this purpose, PyOPC defines a simple QName object, which is similar to a Python tuple.

Moreover PyOPC defines in the module utils the following global variables which may be used as the namespace part for QNames:

An example how to create and access such a QName object is given in example 5, showing the creation of a predefined and a custom QName in line 3 and 4 and accessing parts of the QName in line 5:

\begin{lstlisting}[caption={Handling Qualified Names (QNames) with PyOPC}
url, name = qn2.URI,

Hermann Himmelbauer 2006-11-07