XML Processing

An Overview of the XML processing facilities in Qt.

Qt provides two general-purpose sets of APIs to read and write well-formed XML: stream based and DOM based .

Qt also provides specific support for some XML dialects. For instance, the Qt SVG module provides the QSvgRenderer and QSvgGenerator classes to read and write a subset of SVG, an XML-based file format. Qt also provides helper functions that may be useful to those working with XML and XHTML: see escape() and convertFromPlainText() .

Topics:

Classes for XML Processing

These classes are relevant to XML users.

PySide2.QtXml.QDomImplementation

The QDomImplementation class provides information about the features of the DOM implementation.

PySide2.QtXml.QDomNodeList

The QDomNodeList class is a list of QDomNode objects.

PySide2.QtXml.QDomNode

The QDomNode class is the base class for all the nodes in a DOM tree.

PySide2.QtXml.QDomNamedNodeMap

The QDomNamedNodeMap class contains a collection of nodes that can be accessed by name.

PySide2.QtXml.QDomDocumentType

The QDomDocumentType class is the representation of the DTD in the document tree.

PySide2.QtXml.QDomDocumentFragment

The QDomDocumentFragment class is a tree of QDomNodes which is not usually a complete QDomDocument.

PySide2.QtXml.QDomCharacterData

The QDomCharacterData class represents a generic string in the DOM.

PySide2.QtXml.QDomAttr

The QDomAttr class represents one attribute of a QDomElement.

PySide2.QtXml.QDomElement

The QDomElement class represents one element in the DOM tree.

PySide2.QtXml.QDomText

The QDomText class represents text data in the parsed XML document.

PySide2.QtXml.QDomComment

The QDomComment class represents an XML comment.

PySide2.QtXml.QDomCDATASection

The QDomCDATASection class represents an XML CDATA section.

PySide2.QtXml.QDomNotation

The QDomNotation class represents an XML notation.

PySide2.QtXml.QDomEntity

The QDomEntity class represents an XML entity.

PySide2.QtXml.QDomEntityReference

The QDomEntityReference class represents an XML entity reference.

PySide2.QtXml.QDomProcessingInstruction

The QDomProcessingInstruction class represents an XML processing instruction.

PySide2.QtXml.QDomDocument

The QDomDocument class represents an XML document.

PySide2.QtXml.QXmlParseException

The QXmlParseException class is used to report errors with the QXmlErrorHandler interface.

PySide2.QtXml.QXmlLocator

The QXmlLocator class provides the XML handler classes with information about the parsing position within a file.

PySide2.QtXml.QXmlNamespaceSupport

The QXmlNamespaceSupport class is a helper class for XML readers which want to include namespace support.

PySide2.QtXml.QXmlAttributes

The QXmlAttributes class provides XML attributes.

PySide2.QtXml.QXmlInputSource

The QXmlInputSource class provides the input data for the QXmlReader subclasses.

PySide2.QtXml.QXmlContentHandler

The QXmlContentHandler class provides an interface to report the logical content of XML data.

PySide2.QtXml.QXmlErrorHandler

The QXmlErrorHandler class provides an interface to report errors in XML data.

PySide2.QtXml.QXmlDTDHandler

The QXmlDTDHandler class provides an interface to report DTD content of XML data.

PySide2.QtXml.QXmlEntityResolver

The QXmlEntityResolver class provides an interface to resolve external entities contained in XML data.

PySide2.QtXml.QXmlLexicalHandler

The QXmlLexicalHandler class provides an interface to report the lexical content of XML data.

PySide2.QtXml.QXmlDeclHandler

The QXmlDeclHandler class provides an interface to report declaration content of XML data.

PySide2.QtXml.QXmlDefaultHandler

The QXmlDefaultHandler class provides a default implementation of all the XML handler classes.

PySide2.QtXml.QXmlReader

The QXmlReader class provides an interface for XML readers (i.e. parsers).

PySide2.QtXml.QXmlSimpleReader

The QXmlSimpleReader class provides an implementation of a simple XML parser.

PySide2.QtCore.QXmlStreamEntityResolver

The QXmlStreamEntityResolver class provides an entity resolver for a QXmlStreamReader.

PySide2.QtCore.QXmlStreamReader

The QXmlStreamReader class provides a fast parser for reading well-formed XML via a simple streaming API.

PySide2.QtCore.QXmlStreamAttribute

The QXmlStreamAttribute class represents a single XML attribute.

PySide2.QtCore.QXmlStreamAttributes

The QXmlStreamAttributes class represents a vector of QXmlStreamAttribute.

PySide2.QtCore.QXmlStreamNotationDeclaration

The QXmlStreamNotationDeclaration class represents a DTD notation declaration.

PySide2.QtCore.QXmlStreamNamespaceDeclaration

The QXmlStreamNamespaceDeclaration class represents a namespace declaration.

PySide2.QtCore.QXmlStreamEntityDeclaration

The QXmlStreamEntityDeclaration class represents a DTD entity declaration.

PySide2.QtCore.QXmlStreamWriter

The QXmlStreamWriter class provides an XML writer with a simple streaming API.

PySide2.QtXmlPatterns.QAbstractMessageHandler

The QAbstractMessageHandler class provides a callback interface for handling messages.

PySide2.QtXmlPatterns.QAbstractUriResolver

The QAbstractUriResolver class is a callback interface for resolving Uniform Resource Identifiers. A Uniform Resource Identifier (URI) is a string that uniquely identifies a resource. URIs are versatile global identifiers. It is often useful to transform a URI that identifies something logical into a URI that locates something physical (a URL), or to simply map a URI to a different URI. QAbstractUriResolver::resolve() provides this functionality.

The QAbstractXmlForwardIterator class is a base class for forward iterators.

Helper class for ListIterator, and should only be instantiated through sub-classing.

Bridges values in Qt’s QList container class into an QAbstractXmlForwardIterator.

PySide2.QtXmlPatterns.QAbstractXmlNodeModel

The QAbstractXmlNodeModel class is an abstract base class for modeling non-XML data to look like XML for QXmlQuery.

PySide2.QtXmlPatterns.QXmlItem

The QXmlItem class contains either an XML node or an atomic value.

PySide2.QtXmlPatterns.QXmlNodeModelIndex

The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeModel.

PySide2.QtXmlPatterns.QAbstractXmlReceiver

The QAbstractXmlReceiver class provides a callback interface for transforming the output of a QXmlQuery.

Bridges a QPatternist::SequenceIterator to QAbstractXmlPullProvider.

QSimpleXmlNodeModel

The QSimpleXmlNodeModel class is an implementation of QAbstractXmlNodeModel sufficient for many common cases.

PySide2.QtXmlPatterns.QSourceLocation

The QSourceLocation class identifies a location in a resource by URI, line, and column.

PySide2.QtXmlPatterns.QXmlFormatter

The QXmlFormatter class is an implementation of QXmlSerializer for transforming XQuery output into formatted XML.

PySide2.QtXmlPatterns.QXmlName

The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way. QXmlName represents the name of an XML node in a way that is both efficient and safe for comparing names. Normally, an XML node represents an XML element or attribute, but QXmlName can also represent the names of other kinds of nodes, e.g., QAbstractXmlReceiver::processingInstruction() and QAbstractXmlReceiver::namespaceBinding().

PySide2.QtXmlPatterns.QXmlNamePool

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

PySide2.QtXmlPatterns.QXmlQuery

The QXmlQuery class performs XQueries on XML data, or on non-XML data modeled to look like XML.

PySide2.QtXmlPatterns.QXmlResultItems

The QXmlResultItems class iterates through the results of evaluating an XQuery in QXmlQuery.

PySide2.QtXmlPatterns.QXmlSchema

The QXmlSchema class provides loading and validation of a W3C XML Schema.

PySide2.QtXmlPatterns.QXmlSchemaValidator

The QXmlSchemaValidator class validates XML instance documents against a W3C XML Schema.

PySide2.QtXmlPatterns.QXmlSerializer

The QXmlSerializer class is an implementation of QAbstractXmlReceiver for transforming XQuery output into unformatted XML.