EntityRange.empty

Whether the end of the XML document has been reached.

Note that because an XMLParsingException will be thrown an invalid XML, it's actually possible to call front and popFront without checking empty if the only way that empty would be true is if the XML were invalid (e.g. if at a start tag, it's a given that there's at least one end tag left in the document unless it's invalid XML).

However, of course, caution should be used to ensure that incorrect assumptions are not made that allow the document to reach its end earlier than predicted without throwing an XMLParsingException, since it's still an error to call front or popFront if empty would return false.

struct EntityRange(Config cfg, R)
@property @safe const pure nothrow @nogc
bool
empty
()
if (
isForwardRange!R &&
isSomeChar!(ElementType!R)
)

Meta