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
,Union
,List
]]
-
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 anonymous complex type inside an element.
-
build_inner_enumeration
(parent, obj)[source]¶ Build an enumeration class from an anonymous restriction with enumeration facet.
-
static
has_anonymous_class
(obj)[source]¶ Check if the attribute element contains anonymous complex type.
- Return type
-