serialisation collapses empty tags

Bug #1715595 reported by dommy wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Won't Fix
Undecided
Unassigned

Bug Description

when the tag has nothing in, it will return me a singl tag.
such as I have a <div class="xxx"></div> element, when I use etee.tostring function translate the element, it will give me <div class="xxx"/>, and it's not in rigth format.

Revision history for this message
scoder (scoder) wrote :

It's a perfectly well-formed serialisation, though, and the expected thing for XML. If you want to make sure that tags do not get collapsed, you can change their text from None to '' (the empty string).

Changed in lxml:
status: New → Won't Fix
summary: - etree.tostring function return error format string
+ serialisation collapses empty tags
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.