'Is this element part of an XML tree or an HTML tree?
This is used when mapping a formatter name ("minimal") to an
appropriate function (one that performs entity-substitution on
the contents of <script> and <style> tags, or not). It can be
inefficient, but it should be called very rarely.'

@property
def _is_xml(self):

    if (self.known_xml is not None):
        return self.known_xml
    if (self.parent is None):
        return getattr(self, 'is_xml', False)
    return self.parent._is_xml
