MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / plain

Method plain

suds/sax/element.py:772–793  ·  view source on GitHub ↗

Get a string representation of this XML fragment. @return: A I{plain} string. @rtype: basestring

(self)

Source from the content-addressed store, hash-verified

770 return result
771
772 def plain(self):
773 """
774 Get a string representation of this XML fragment.
775 @return: A I{plain} string.
776 @rtype: basestring
777 """
778 result = []
779 result.append('<%s' % self.qname())
780 result.append(self.nsdeclarations())
781 for a in [unicode(a) for a in self.attributes]:
782 result.append(' %s' % a)
783 if self.isempty():
784 result.append('/>')
785 return ''.join(result)
786 result.append('>')
787 if self.hasText():
788 result.append(self.text.escape())
789 for c in self.children:
790 result.append(c.plain())
791 result.append('</%s>' % self.qname())
792 result = ''.join(result)
793 return result
794
795 def nsdeclarations(self):
796 """

Callers 1

sendMethod · 0.45

Calls 6

qnameMethod · 0.95
nsdeclarationsMethod · 0.95
isemptyMethod · 0.95
hasTextMethod · 0.95
appendMethod · 0.45
escapeMethod · 0.45

Tested by

no test coverage detected