alias

Top  Previous  Next

- alias <name>

 

Another name for the container, value or attribute. It is the alias name that is used when marshalling and unmarshalling the domain objects to XML.

 

The Schema

 

<schema packageScope="com.wickedfastsolutions.demo.domain">
    <Person alias="p">
        <FirstName alias="f">John</FirstName>
        <LastName alias="l">Doe</LastName>
    </Person>
</schema>

 

The XML Instance

 

<p>
    <f>John</f>
    <l>Doe</l>
</p>

 

 

Domain Object

 

package com.wickedfastsolutions.demo.domain.api;
 
public interface Person
{
    String getFirstName();
    
    String getLastName();
    
    void setFirstName(final String firstName);
    
    void setLastName(final String lastName);
}