return writer.getvalue()
def toprettyxml(self, indent="\t", newl="\n"):
- # indent = the indentation string to prepend, per level
- # newl = the newline string to append
- writer = _get_StringIO()
- self.writexml(writer, "", indent, newl)
- return writer.getvalue()
+ # indent = the indentation string to prepend, per level
+ # newl = the newline string to append
+ writer = _get_StringIO()
+ self.writexml(writer, "", indent, newl)
+ return writer.getvalue()
def hasChildNodes(self):
if self.childNodes:
def createAttribute(self, qName):
a = Attr(qName)
a.ownerDocument = self
+ a.value = ""
return a
def createElementNS(self, namespaceURI, qualifiedName):
prefix, localName = _nssplit(qualifiedName)
a = Attr(qualifiedName, namespaceURI, localName, prefix)
a.ownerDocument = self
+ a.value = ""
return a
def getElementsByTagNameNS(self, namespaceURI, localName):