def putInToC(document, toc):
    tocOrig = domhelpers.findElementsWithAttribute(document, 'class', 'toc')
    if tocOrig:
        tocOrig= tocOrig[0]
        tocOrig.childNodes = [toc]
Insert the given table of contents into the given document.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/lore/tree.py/putInToC