From dc381b5afcae0994094d49465142e6099dcec86c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 1 Dec 2013 11:26:10 +0000 Subject: Add style_name to paragraphs --- mammoth/xmlparser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mammoth/xmlparser.py') 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 -- cgit v1.2.3