def append_text(self, content): """ Append text nodes into L{Content.data} Here is where the I{true} type is used to translate the value into the proper python type. @param content: The current content being unmarshalled. @type content: L{Content} """ Core.append_text(self, content) known = self.resolver.top().resolved content.text = self.translated(content.text, known)
def append_attribute(self, name, value, content): """ Append an attribute name/value into L{Content.data}. @param name: The attribute name @type name: basestring @param value: The attribute's value @type value: basestring @param content: The current content being unmarshalled. @type content: L{Content} """ type = self.resolver.findattr(name) if type is None: log.warn('attribute (%s) type, not-found', name) else: value = self.translated(value, type) Core.append_attribute(self, name, value, content)
def process(self, node): """ Process an object graph representation of the xml I{node}. @param node: An XML tree. @type node: L{sax.element.Element} @return: A suds object. @rtype: L{Object} """ content = Content(node) return Core.process(self, content)
def process(self, node, type): """ Process an object graph representation of the xml L{node}. @param node: An XML tree. @type node: L{sax.element.Element} @param type: The I{optional} schema type. @type type: L{xsd.sxbase.SchemaObject} @return: A suds object. @rtype: L{Object} """ content = Content(node) content.type = type return Core.process(self, content)