"""
PySide stub files generated by **IceSpringPySideStubs**

Home: https://baijifeilong.github.io/2022/01/06/ice-spring-pyside-stubs/index.html

Github: https://github.com/baijifeilong/IceSpringPySideStubs

PyPI(PySide2): https://pypi.org/project/IceSpringPySideStubs-PySide2

PyPI(PySide6): https://pypi.org/project/IceSpringPySideStubs-PySide6

PyPI(PyQt5): https://pypi.org/project/IceSpringPySideStubs-PyQt5

PyPI(PyQt6): https://pypi.org/project/IceSpringPySideStubs-PyQt6

Generated by BaiJiFeiLong@gmail.com

License: MIT
"""
import typing
from PyQt5 import QtCore
from PyQt5.QtXmlPatterns import *


class QXmlSerializer(QAbstractXmlReceiver):
    """
    https://doc.qt.io/qt-5/qxmlserializer.html

    **Detailed Description**

    QXmlSerializer translates an **XQuery sequence** , usually the output of an
    **QXmlQuery** , into XML. Consider the example:

    **QXmlQuery**  query;
    query.setQuery("doc('index.html')/html/body/p[1]");
    **QXmlSerializer**  serializer(query, myOutputDevice);
    query.evaluateTo(&serializer);

    First it constructs a **query**  that gets the first paragraph from document
    `index.html`. Then it constructs an instance of this class with the
    **query**  and **myOutputDevice** . Finally, it **evaluates**  the **query**
    , producing an ordered sequence of calls to the serializer's callback
    functions. The sequence of callbacks transforms the query output to XML and
    writes it to **myOutputDevice** .

    QXmlSerializer will:

    * Declare namespaces when needed,
      * Use appropriate escaping, when
    characters can't be represented in the XML,
      * Handle line endings
    appropriately,
      * Report errors, when it can't serialize the content, e.g.,
    when asked to serialize an attribute that is a top-level node, or when more
    than one top-level element is encountered.

    If an error occurs during serialization, result is undefined unless the
    serializer is driven through a call to **QXmlQuery::evaluateTo** ().

    If the generated XML should be indented and formatted for reading, use
    **QXmlFormatter** .

    **See also** **XSLT 2.0 and XQuery 1.0 Serialization**  and
    **QXmlFormatter** .
    """

    def __init__(self, query: "QXmlQuery", outputDevice: QtCore.QIODevice) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#QXmlSerializer

        **QXmlSerializer::QXmlSerializer(const QXmlQuery & query , QIODevice *
        outputDevice )**

        Constructs a serializer that uses the name pool and message handler in
        **query** , and writes the output to **outputDevice**.

        **outputDevice** must be a valid, non-null device that is open in write
        mode, otherwise behavior is undefined.

        **outputDevice** must not be opened with **QIODevice::Text**  because it
        will cause the output to be incorrect. This class will ensure line
        endings are serialized as according with the XML specification.
        QXmlSerializer does not take ownership of **outputDevice**.
        """
        ...

    def codec(self) -> QtCore.QTextCodec:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#codec

        **const QTextCodec *QXmlSerializer::codec() const**

        Returns the codec being used by the serializer for encoding its XML
        output.

        **See also** **setCodec** ().
        """
        ...

    def setCodec(self, codec: QtCore.QTextCodec) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#setCodec

        **void QXmlSerializer::setCodec(const QTextCodec * outputCodec )**

        Sets the codec the serializer will use for encoding its XML output. The
        output codec is set to **outputCodec**. By default, the output codec is
        set to the one for `UTF-8`. The serializer does not take ownership of
        the codec.

        **See also** **codec** ().
        """
        ...

    def outputDevice(self) -> QtCore.QIODevice:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#outputDevice

        **QIODevice *QXmlSerializer::outputDevice() const**

        Returns a pointer to the output device. There is no corresponding
        function to **set** the output device, because the output device must be
        passed to the constructor. The serializer does not take ownership of its
        IO device.
        """
        ...

    def endOfSequence(self) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#endOfSequence

        **[override virtual] void QXmlSerializer::endOfSequence()**

        Reimplements: **QAbstractXmlReceiver::endOfSequence** ().
        """
        ...

    def startOfSequence(self) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#startOfSequence

        **[override virtual] void QXmlSerializer::startOfSequence()**

        Reimplements: **QAbstractXmlReceiver::startOfSequence** ().
        """
        ...

    def endDocument(self) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#endDocument

        **[override virtual] void QXmlSerializer::endDocument()**

        Reimplements: **QAbstractXmlReceiver::endDocument** ().
        """
        ...

    def startDocument(self) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#startDocument

        **[override virtual] void QXmlSerializer::startDocument()**

        Reimplements: **QAbstractXmlReceiver::startDocument** ().
        """
        ...

    def atomicValue(self, value: typing.Any) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#atomicValue

        **[override virtual] void QXmlSerializer::atomicValue(const QVariant &
        value )**

        Reimplements: **QAbstractXmlReceiver::atomicValue** (const QVariant
        &value).
        """
        ...

    def processingInstruction(self, name: "QXmlName", value: str) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#processingInstruction

        **[override virtual] void QXmlSerializer::processingInstruction(const
        QXmlName & name , const QString & value )**

        Reimplements: **QAbstractXmlReceiver::processingInstruction** (const
        QXmlName &target, const QString &value).
        """
        ...

    def attribute(self, name: "QXmlName", value: str) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#attribute

        **[override virtual] void QXmlSerializer::attribute(const QXmlName &
        name , const QStringRef & value )**

        Reimplements: **QAbstractXmlReceiver::attribute** (const QXmlName &name,
        const QStringRef &value).
        """
        ...

    def endElement(self) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#endElement

        **[override virtual] void QXmlSerializer::endElement()**

        Reimplements: **QAbstractXmlReceiver::endElement** ().
        """
        ...

    def startElement(self, name: "QXmlName") -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#startElement

        **[override virtual] void QXmlSerializer::startElement(const QXmlName &
        name )**

        Reimplements: **QAbstractXmlReceiver::startElement** (const QXmlName
        &name).
        """
        ...

    def comment(self, value: str) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#comment

        **[override virtual] void QXmlSerializer::comment(const QString & value
        )**

        Reimplements: **QAbstractXmlReceiver::comment** (const QString &value).
        """
        ...

    def characters(self, value: str) -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#characters

        **[override virtual] void QXmlSerializer::characters(const QStringRef &
        value )**

        Reimplements: **QAbstractXmlReceiver::characters** (const QStringRef
        &value).
        """
        ...

    def namespaceBinding(self, nb: "QXmlName") -> None:
        """
        https://doc.qt.io/qt-5/qxmlserializer.html#namespaceBinding

        **[override virtual] void QXmlSerializer::namespaceBinding(const
        QXmlName & nb )**

        Reimplements: **QAbstractXmlReceiver::namespaceBinding** (const QXmlName
        &name).
        """
        ...
