XML Instances Generator

The XML Instances Generator preferences panel is opened from menu WindowPreferencesoXygen+XML+XML Instances Generator

Figure 19.32. The XML Instances Generator preferences panel

The XML Instances Generator preferences panel

Generate optional elements

If checked the elements declared optional in the schema will be generated in the XML instance

Generate optional attributes

If checked the attributes declared optional in the schema will be generated in the XML instance

Values of elements and attributes

Specifies what values are generated in elements and attributes of the XML instance. It can have one of the values: None (no values for elements and attributes), Default (the value is like the element name or attribute name), Random (a random value).

Preferred number of repetitions

The number of repetitions for an element that has a big value of the maxOccurs attribute.

Maximum recursivity level

For recursive type definitions this parameter specifies the number of levels of recursive elements inserted in the parent element with the same name.

Choice strategy

For choice element models specifies what choice will be generated in the XML instance. It can be First (the first choice is generated) or Random (a random choice is generated).

Generate the other options as comments

If checked the other options of the choice element model which are not selected will be generated inside a comment in the XML instance.

Use incremental attribute/element names as default

If checked the value of an element/attribute is like the name of that element/attribute. For example the values of a elements are a1, a2, a3, etc. If not checked the value is the name of the type of that element /attribute, for example string, decimal, etc.

Maximum length

The maximum length of string values generated for elements and attributes.