test_xml_etree.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:zippy 作者: securesystemslab 项目源码 文件源码
def processinginstruction():
    """
    Test ProcessingInstruction directly

    >>> ET.tostring(ET.ProcessingInstruction('test', 'instruction'))
    b'<?test instruction?>'
    >>> ET.tostring(ET.PI('test', 'instruction'))
    b'<?test instruction?>'

    Issue #2746

    >>> ET.tostring(ET.PI('test', '<testing&>'))
    b'<?test <testing&>?>'
    >>> ET.tostring(ET.PI('test', '<testing&>\xe3'), 'latin1')
    b"<?xml version='1.0' encoding='latin1'?>\\n<?test <testing&>\\xe3?>"
    """

#
# xinclude tests (samples from appendix C of the xinclude specification)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号