xsdata.builder module¶
-
class
xsdata.builder.
ClassBuilder
(schema)[source]¶ Bases:
object
-
schema
: Schema = None¶
-
target_prefix
: Optional[str] = None¶
-
element_children
(obj)[source]¶ Recursively find and return all child elements that are qualified to be class attributes.
- Return type
Iterator
[Union
[Attribute
,Element
,Restriction
,Enumeration
]]
-
element_extensions
(obj, include_current=True)[source]¶ Recursively find and return all parent Extension classes.
If the initial given obj has a type attribute include it in result.
-
build_class_attribute
(parent, obj)[source]¶ Generate and append an attribute instance to the parent class.
Skip if no real type could be detected because of an invalid schema or missing implementation.
-
build_inner_class
(parent, obj)[source]¶ Build a class from an Element complex type and append it to the parent inner class list.
Assign the element name to the complex type name and to the element type.
-