Code: Select all
<parent>
<child></child>
</parent>
- EXN_ELEMENT "parent"
EXN_TEXT
EXN_ELEMENT "child"
EXN_ELEMENT_END "child"
EXN_TEXT
EXN_ELEMENT_END "parent"
Code: Select all
<parent>
<child />
</parent>
- EXN_ELEMENT "parent"
EXN_TEXT
EXN_ELEMENT "child"
EXN_TEXT
EXN_ELEMENT_END "parent"
This behavior sort of makes sense since there wasn't an actual end element in the XML stream, but it makes it very hard to parse through XML files which may optionally contain empty elements, and I consider it a bug.
Writing a fix for this isn't very difficult, but before I do I'd like to ask: Does the forum agree that this is an actual bug? Or are there people relying on this behavior? Any other comments?