Skip to content

Standard Mapping Style

Alexey Valikov edited this page Feb 27, 2015 · 20 revisions

Standard Mapping Style

Standard mapping style is a mapping style used by Jsonix by default.

Root element

Example.

XML:

<value attribute="check">test</value>

JS:

TODO

Character content

Value property

Example.

Fragment of the mapping:

{
	name: 'value',
	typeInfo: 'String',
	type: 'value'
}

XML:

<value attribute="check">test</value>

JS:

TODO

Attributes

Attribute property

Attribute property is mapped to property of the JavaScript object with the same name as declared in the mapping.

Example.

Fragment of the mapping:

{
	name: 'string',
	attributeName: 'string',
	type: 'attribute'
}

XML:

<attribute string="zero" integers="1 2">test</attribute>

JS:

TODO

Any attribute property

Example.

Fragment of the mapping:

{
	name: 'otherAttributes',
	type: 'anyAttribute'
}

Elements

Element property

Fragment of the mapping:

TODO

XML:

<element><element>one</element></element>

JS:

TODO

Elements property

Fragment of the mapping:

TODO

XML:

<elements><string>one</string><integer>2</integer><integer>3</integer><string>four</string></elements>

JS:

TODO

Element map property

Fragment of the mapping:

TODO

XML:

TODO

JS:

TODO

Element reference property

Fragment of the mapping:

TODO

XML:

<elementRef><base><alpha>one</alpha><beta>2</beta></base></elementRef>

JS:

TODO

Element references property

Fragment of the mapping:

TODO

XML:

<elementRefs><alpha>one</alpha><beta>2</beta></elementRefs>

JS:

TODO

Any element property

Fragment of the mapping:

TODO

XML:

<anyElementLax><string>test</string></anyElementLax>

JS:

TODO
Clone this wiki locally