diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-01 11:26:10 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-01 11:26:10 +0000 |
| commit | dc381b5afcae0994094d49465142e6099dcec86c (patch) | |
| tree | 0624f7068dfb5ec9d6ffac0d94d488e93f842c3d /mammoth/xmlparser.py | |
| parent | 68047ef381cb08cf43e5a30ca9dd6e40ccde8cdd (diff) | |
Add style_name to paragraphs
Diffstat (limited to 'mammoth/xmlparser.py')
| -rw-r--r-- | mammoth/xmlparser.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mammoth/xmlparser.py b/mammoth/xmlparser.py index c645ad4..8b26777 100644 --- a/mammoth/xmlparser.py +++ b/mammoth/xmlparser.py @@ -6,7 +6,9 @@ XmlElement = collections.namedtuple("XmlElement", ["name", "attributes", "childr XmlText = collections.namedtuple("XmlText", ["value"]) -element = XmlElement +def element(name, attributes=None, children=None): + return XmlElement(name, attributes or {}, children or []) + text = XmlText |
