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

Method build

suds/xsd/sxbasic.py:761–780  ·  view source on GitHub ↗

Build an xsobject representation. @param root: An schema XML root. @type root: L{sax.element.Element} @param filter: A tag filter. @type filter: [str,...] @return: A schema object graph. @rtype: L{sxbase.SchemaObject}

(cls, root, schema, filter=('*',))

Source from the content-addressed store, hash-verified

759
760 @classmethod
761 def build(cls, root, schema, filter=('*',)):
762 """
763 Build an xsobject representation.
764 @param root: An schema XML root.
765 @type root: L{sax.element.Element}
766 @param filter: A tag filter.
767 @type filter: [str,...]
768 @return: A schema object graph.
769 @rtype: L{sxbase.SchemaObject}
770 """
771 children = []
772 for node in root.getChildren(ns=Namespace.xsdns):
773 if '*' in filter or node.name in filter:
774 child = cls.create(node, schema)
775 if child is None:
776 continue
777 children.append(child)
778 c = cls.build(node, schema, child.childtags())
779 child.rawchildren = c
780 return children
781
782 @classmethod
783 def collate(cls, children):

Callers

nothing calls this directly

Calls 4

getChildrenMethod · 0.80
createMethod · 0.45
appendMethod · 0.45
childtagsMethod · 0.45

Tested by

no test coverage detected