Exemple #1
0
def writeHtmlDoc(filing, root, reportZip, reportFolder, filename):
    htmlText = treeToString(root,
                            method='html',
                            with_tail=False,
                            pretty_print=True,
                            encoding='utf-8')
    if reportZip:
        reportZip.writestr(filename, htmlText)
    elif reportFolder is not None:
        filing.writeFile(os.path.join(reportFolder, filename), htmlText)
Exemple #2
0
def writeXmlDoc(filing, etree, reportZip, reportFolder, filename):
    xmlText = treeToString(etree.getroottree(),
                           method='xml',
                           with_tail=False,
                           pretty_print=True,
                           encoding='utf-8',
                           xml_declaration=True)
    if reportZip:
        reportZip.writestr(filename, xmlText)
    elif reportFolder is not None:
        filing.writeFile(os.path.join(reportFolder, filename), xmlText)
Exemple #3
0
def writeHtmlDoc(filing, root, reportZip, reportFolder, filename):
    htmlText =  treeToString(root, method='html', with_tail=False, pretty_print=True, encoding='utf-8')
    if reportZip:
        reportZip.writestr(filename, htmlText)  
    elif reportFolder is not None:
        filing.writeFile(os.path.join(reportFolder, filename), htmlText)
Exemple #4
0
def writeXmlDoc(filing, etree, reportZip, reportFolder, filename):  
    xmlText = treeToString(etree.getroottree(), method='xml', with_tail=False, pretty_print=True, encoding='utf-8', xml_declaration=True)
    if reportZip:
        reportZip.writestr(filename, xmlText)  
    elif reportFolder is not None:
        filing.writeFile(os.path.join(reportFolder, filename), xmlText)