GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — ElementTree: itertext() and tostring(method="text") lose the text of elements whose tag is a QName · Issue #161809 · python/cpython Open Labels extension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-XMLtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description
import xml.etree.ElementTree as ET root = ET.Element(ET.QName("http://example.com/ns", "doc")) root.text = "hello " b = ET.SubElement(root, "b"); b.text = "world"; b.tail = "!" i = ET.SubElement(root, ET.QName("http://example.com/ns", "i")); i.text = "QTEXT" ET.tostring(root, encoding="unicode") # '<ns0:doc xmlns:ns0="http://example.com/ns">hello <b>world</b>!<ns0:i>QTEXT</ns0:i></ns0:doc>' list(root.itertext())
Cause. Both implementations skip on "tag is not a CPython versions tested on:3.12, 3.13, 3.14, CPython main branch Operating systems tested on:No response Activity
MetadataMetadataAssigneesLabelsextension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-XMLtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions | |||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |