Пример #1
0
 def append_text(self, content):
     """
     Append text nodes into L{Content.data}
     @param content: The current content being unmarshalled.
     @type content: L{Content}
     """
     Core.append_text(self, content)
     resolved = content.type.resolve()
     content.text = self.translated(content.text, content.type)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 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)
Пример #7
0
 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)
Пример #8
0
 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)
Пример #9
0
 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)