1.1 --- a/libxml2dom/soap.py Sun Jan 26 21:53:15 2014 +0100
1.2 +++ b/libxml2dom/soap.py Sun Jan 26 22:55:18 2014 +0100
1.3 @@ -6,7 +6,7 @@
1.4
1.5 See: http://www.w3.org/TR/2007/REC-soap12-part0-20070427/
1.6
1.7 -Copyright (C) 2007, 2008 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2007, 2008, 2014 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU Lesser General Public License as published by the Free
1.12 @@ -66,19 +66,6 @@
1.13
1.14 "Convenience modifications to nodes specific to libxml2dom.soap."
1.15
1.16 - def xpath(self, expr, variables=None, namespaces=None):
1.17 -
1.18 - """
1.19 - Evaluate the given 'expr' using the optional 'variables' and
1.20 - 'namespaces'. If not otherwise specified, the prefixes given in the
1.21 - module global 'default_ns' will be bound as in that dictionary.
1.22 - """
1.23 -
1.24 - ns = {}
1.25 - ns.update(default_ns)
1.26 - ns.update(namespaces or {})
1.27 - return libxml2dom.Node.xpath(self, expr, variables, ns)
1.28 -
1.29 def add_or_replace_element(self, new_element):
1.30
1.31 """
1.32 @@ -163,6 +150,16 @@
1.33
1.34 "A SOAP document fragment."
1.35
1.36 + def __init__(self, node, impl, namespaces=None):
1.37 +
1.38 + """
1.39 + Initialise the document with the given 'node', implementation 'impl',
1.40 + and 'namespaces' details.
1.41 + """
1.42 +
1.43 + libxml2dom._Document.__init__(self, node, impl, None)
1.44 + self._update_namespaces([default_ns, namespaces])
1.45 +
1.46 def _envelope(self):
1.47 return (self.xpath("env:Envelope|SOAP-ENV:Envelope") or [None])[0]
1.48