Table Of Contents

QXmlNamePool

Detailed Description

The PySide.QtXmlPatterns.QXmlNamePool class is a table of shared strings referenced by instances of PySide.QtXmlPatterns.QXmlName .

PySide.QtXmlPatterns.QXmlNamePool is used to optimize operations on instances of PySide.QtXmlPatterns.QXmlName . An instance of PySide.QtXmlPatterns.QXmlName represents an XML name in a way that allows the XML name to be compared and passed around efficiently. The efficiency is achieved by storing the strings comprising the XML names in an instance of PySide.QtXmlPatterns.QXmlNamePool , where they are mapped to binary identifiers, which are then packed into a key which is stored in the PySide.QtXmlPatterns.QXmlName .

This means that each instance of PySide.QtXmlPatterns.QXmlName is tied to the name pool it was created with, and that name pool should be kept in scope and used to create all instances of PySide.QtXmlPatterns.QXmlName that might be compared. Note also that the name pool is required if you must reconstitute the PySide.QtXmlPatterns.QXmlName as text, or if you must access any of its component strings, so although instances of PySide.QtXmlPatterns.QXmlName can be compared without reference to a name pool, the name pool must be kept in scope if the name’s strings must be accessed later.

class PySide.QtXmlPatterns.QXmlNamePool
class PySide.QtXmlPatterns.QXmlNamePool(other)
Parameters:otherPySide.QtXmlPatterns.QXmlNamePool

Constructs an empty name pool.

Constructs a copy of the other name pool.