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

Method xml

suds/wsse.py:161–182  ·  view source on GitHub ↗

Get xml representation of the object. @return: The root node. @rtype: L{Element}

(self)

Source from the content-addressed store, hash-verified

159 self.created = dt
160
161 def xml(self):
162 """
163 Get xml representation of the object.
164 @return: The root node.
165 @rtype: L{Element}
166 """
167 root = Element('UsernameToken', ns=wssens)
168 u = Element('Username', ns=wssens)
169 u.setText(self.username)
170 root.append(u)
171 p = Element('Password', ns=wssens)
172 p.setText(self.password)
173 root.append(p)
174 if self.nonce is not None:
175 n = Element('Nonce', ns=wssens)
176 n.setText(self.nonce)
177 root.append(n)
178 if self.created is not None:
179 n = Element('Created', ns=wsuns)
180 n.setText(str(DateTime(self.created)))
181 root.append(n)
182 return root
183
184
185class Timestamp(Token):

Callers

nothing calls this directly

Calls 4

setTextMethod · 0.95
appendMethod · 0.95
ElementClass · 0.90
DateTimeClass · 0.90

Tested by

no test coverage detected