Package pyxb :: Package binding :: Module basis :: Class ElementContent |
[hide private]
[frames] | no frames]

# type ElementContent

source code

    object --+
             |
      _Content --+
                 |
                ElementContent

Marking wrapper for element content.

The value should be translated into XML and made a child of its parent.

Instance Methods | [hide private]
__getElementDeclaration(self) The pyxb.binding.content.ElementDeclaration associated with the element content. | source code
__init__(self, value, element_declaration=None, instance=None, tag=None) Create a wrapper associating a value with its element declaration. | source code
Inherited from `_Content` (private): `_Content__getValue`

Class Methods | [hide private]
Inherited from `_Content`: `ContentIterator`

Class Variables | [hide private]
| __elementDeclaration = `None`
Inherited from `_Content` (private): `_Content__value`

Properties | [hide private]
| elementDeclaration The pyxb.binding.content.ElementDeclaration associated with the element content.
Inherited from `_Content`: `value`

Method Details | [hide private]

### __getElementDeclaration(self) | source code
The pyxb.binding.content.ElementDeclaration associated with the element content. This may be `None` if the value is a wildcard.

### __init__(self, value, element_declaration=None, instance=None, tag=None) (Constructor) | source code
Create a wrapper associating a value with its element declaration. Normally the element declaration is determined by consulting the content model when creating a binding instance. When manipulating the preferred content list, this may be inconvenient to obtain; in that case provide the `instance` in which the content appears immediately, along with the `tag` that is used for the Python attribute that holds the element. Parameters: `value` - the value of the element. Should be an instance of _TypeBinding_mixin, but for simple types might be a Python native type. `element_declaration` - The pyxb.binding.content.ElementDeclaration associated with the element value. Should be `None` if the element matches wildcard content. `instance` - Alternative path to providing `element_declaration` `tag` - Alternative path to providing `element_declaration` Overrides: _Content.__init__

Property Details | [hide private]

### elementDeclaration The pyxb.binding.content.ElementDeclaration associated with the element content. This may be `None` if the value is a wildcard. Get Method: __getElementDeclaration(self) - The pyxb.binding.content.ElementDeclaration associated with the element content.