def downgrade_title_nodes(element):
    """Downgrade title nodes (h2 -> h3, h3 -> h4, h4 -> h5, h5-> h6).
    """
    for expr, tag in [('//h5', 'h6'), ('//h4', 'h5'), ('//h3', 'h4'), (
        '//h2', 'h3'), ('//h1', 'h2')]:
        for node in element.xpath(expr):
            node.tag = tag
