xml.SampleXMLGeneratorOptions

Options class for sample xml generation.

class xml.SampleXMLGeneratorOptions

Attributes

xml.SampleXMLGeneratorOptions.assign_schema_or_dtd

The xml.AssignSchemaOrDTD enum that describes how a schema/DTD is referenced from the generated document.

xml.SampleXMLGeneratorOptions.choice_mode

The xml.ChoiceMode enum that describes which branch to use if a choice is encountered.

xml.SampleXMLGeneratorOptions.consider_nillable

Treat element content of nillable elements as non-mandatory.

xml.SampleXMLGeneratorOptions.consider_sample_value_hints

Use value hints from sample values/enum facets (bool).

xml.SampleXMLGeneratorOptions.create_start_element

Create a start element (bool). Should be set to True.

xml.SampleXMLGeneratorOptions.default_namespace

Default namespace to use in sample xml (string).

xml.SampleXMLGeneratorOptions.enum_values

The xml.EnumValues enum that describes how manually added sample values are used.

xml.SampleXMLGeneratorOptions.fill_attributes_with_text

Fill attributes with data (bool).

xml.SampleXMLGeneratorOptions.fill_elements_with_text

Fill elements with data (bool).

xml.SampleXMLGeneratorOptions.find_exact_value_for_xsitype

For elements with an abstract type, try to use a non-abstract type for xsi:type (bool).

xml.SampleXMLGeneratorOptions.generate_content

Generate any content (bool).

xml.SampleXMLGeneratorOptions.generate_optional_attributes

Generate non-mandatory attributes (bool).

xml.SampleXMLGeneratorOptions.generate_optional_elements

Generate non-mandatory elements (bool).

xml.SampleXMLGeneratorOptions.max_minimization_depth

Maximum recursion depth (int).

xml.SampleXMLGeneratorOptions.namespace_bindings

Map of namespace bindings prefix -> namespace (dict[“prefix”] = “namespace”)

xml.SampleXMLGeneratorOptions.occurrence_limit

Number of elements to be generated if repeatable (int).

xml.SampleXMLGeneratorOptions.prefered_min_length

Prefered minimum content length for string elements (int).

xml.SampleXMLGeneratorOptions.wildcard_penalty_length

Penalty value to avoid branches with a strict wildcard (int).

Methods

xml.SampleXMLGeneratorOptions.as_dict()

Returns a dictionary representation of the SampleXMLGeneratorOptions

Special methods

__eq__, __ge__, __gt__, __le__, __lt__, __ne__