120 if len(odfElement.childNodes) != 0:
121 for child
in odfElement.childNodes:
122 if child.nodeType == Node.TEXT_NODE:
123 result.append(child.data)
124 elif child.nodeType == Node.ELEMENT_NODE:
126 tagName = subElement.qname;
127 if tagName == (
u"urn:oasis:names:tc:opendocument:xmlns:text:1.0",
u"line-break"):
129 elif tagName == (
u"urn:oasis:names:tc:opendocument:xmlns:text:1.0",
u"tab"):
131 elif tagName == (
u"urn:oasis:names:tc:opendocument:xmlns:text:1.0",
u"s"):
132 c = subElement.getAttribute(
'c')
138 result.append(
" " * spaceCount)
141 return ''.join(result)
_emitSpaces(self, odfElement)
Creates a <text:s> element for the current spaceCount.
_emitTextBuffer(self, odfElement)
Creates a Text Node whose contents are the current textBuffer.
addTextToElement(self, odfElement, s)
Process an input string, inserting <text:tab> elements for '\t', <text:line-break> elements for ' ',...