test_xml_etree.py 文件源码

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

项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码
def processinginstruction():
    """
    Test ProcessingInstruction directly

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

    Issue #2746

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

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


问题


面经


文章

微信
公众号

扫码关注公众号