summaryrefslogtreecommitdiff
path: root/mammoth/docx/document_xml.py
blob: 1c1500113ecef165a9d5e9b1c5a62dfed045dbcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from .. import documents


def read_document_xml_element(element,
        body_reader,
        notes=None):
    
    if notes is None:
        notes = []
    
    body_element = element.find_child("w:body")
    return body_reader.read_all(body_element.children) \
        .map(lambda children: documents.document(children, documents.notes(notes)))