• PySide 模块
  • PySide.QtXml
  • 内容表

    上一话题

    QDomDocumentType

    下一话题

    QDomEntityReference

    QDomProcessingInstruction

    概要

    函数

    详细描述

    PySide.QtXml.QDomProcessingInstruction class represents an XML processing instruction.

    XML 使用处理指令将特定处理器信息保持在文档的文本中。

    出现在 XML 文档顶部的 XML 声明,通常为 <?xml version='1.0' encoding='UTF-8'?> ,QDom 将其视为处理指令。这很不幸,因为 XML 声明不是处理指令;除其它差异外,不可以将其插入文档任何地方,但可插入第一行。

    不要使用此函数来创建 XML 声明,因为尽管它拥有如处理指令相同句法,但它不是处理指令且可能不会被 QDom 这样对待。

    处理指令内容的检索采用 PySide.QtXml.QDomProcessingInstruction.data() and set with PySide.QtXml.QDomProcessingInstruction.setData() . The processing instruction's target is retrieved with PySide.QtXml.QDomProcessingInstruction.target() .

    For further information about the Document Object Model see Level 1 and Level 2 Core. For a more general introduction of the DOM implementation see the PySide.QtXml.QDomDocument 文档编制。

    class PySide.QtXml. QDomProcessingInstruction
    class PySide.QtXml. QDomProcessingInstruction ( x )
    参数: x PySide.QtXml.QDomProcessingInstruction

    构造空处理指令。使用 QDomDocument.createProcessingInstruction() to create a processing instruction with content.

    构造副本为 x .

    拷贝数据是共享的 (浅拷贝):修改一个节点也将改变另一节点。若想要制作深度副本,使用 PySide.QtXml.QDomNode.cloneNode() .

    PySide.QtXml.QDomProcessingInstruction. data ( )
    返回类型: unicode

    返回此处理指令的内容。

    PySide.QtXml.QDomProcessingInstruction. setData ( d )
    参数: d – unicode

    将处理指令中包含的数据设为 d .

    PySide.QtXml.QDomProcessingInstruction. target ( )
    返回类型: unicode

    返回此处理指令的目标。