-
Notifications
You must be signed in to change notification settings - Fork 82
Standard Mapping Style
Alexey Valikov edited this page Feb 27, 2015
·
20 revisions
Standard mapping style is a mapping style used by Jsonix by default.
- Root element
- Character content
- Attributes
- Elements
Example.
XML:
<value attribute="check">test</value>JS:
TODO
Example.
Fragment of the mapping:
{
name: 'value',
typeInfo: 'String',
type: 'value'
}XML:
<value attribute="check">test</value>JS:
TODO
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
Example.
Fragment of the mapping:
{
name: 'otherAttributes',
type: 'anyAttribute'
}Fragment of the mapping:
TODOXML:
<element><element>one</element><elements>two</elements><elements>three</elements><item>four five</item><items>six seven</items><items>eight nine</items></element>JS:
TODOFragment of the mapping:
TODOXML:
<elements><string>one</string><integer>2</integer><integer>3</integer><string>four</string></elements>JS:
TODOFragment of the mapping:
TODOXML:
TODOJS:
TODOFragment of the mapping:
TODOXML:
<elementRef><base><alpha>one</alpha><beta>2</beta></base></elementRef>JS:
TODOFragment of the mapping:
TODOXML:
<elementRefs><alpha>one</alpha><beta>2</beta></elementRefs>JS:
TODOFragment of the mapping:
TODOXML:
<anyElementLax><string>test</string></anyElementLax>JS:
TODO