serialisation collapses empty tags
Bug #1715595 reported by
dommy wang
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.
To post a comment you must log in.
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).