Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.simpleframework.xml.stream
Interface Style

All Known Implementing Classes:
  CamelCaseStyle, HyphenStyle

    public interface Style

The `Style` interface is used to represent an XML style that can be applied to a serialized object. A style can be used to modify the element and attribute names for the generated document. Styles can be used to generate hyphenated or camel case XML.

        <example-element>
            <child-element example-attribute='example'>
               <inner-element>example</inner-element>
            </child-element>
         </example-element>

Above the hyphenated XML elements and attributes can be generated from a style implementation. Styles enable the same objects to be serialized in different ways, generating different styles of XML without having to modify the class schema for that object.

Author:
  Niall Gallagher

Method Summary
`java.lang.String` | `getAttribute(java.lang.String name)` This is used to generate the XML attribute representation of the specified name.
`java.lang.String` | `getElement(java.lang.String name)` This is used to generate the XML element representation of the specified name.

Method Detail

### getElement

    java.lang.String getElement(java.lang.String name)

  This is used to generate the XML element representation of the specified name. Element names should ensure to keep the uniqueness of the name such that two different names will be styled in to two different strings.

  Parameters:
    `name` - this is the element name that is to be styled
  Returns:
    this returns the styled name of the XML element

### getAttribute

    java.lang.String getAttribute(java.lang.String name)

  This is used to generate the XML attribute representation of the specified name. Attribute names should ensure to keep the uniqueness of the name such that two different names will be styled in to two different strings.

  Parameters:
    `name` - this is the attribute name that is to be styled
  Returns:
    this returns the styled name of the XML attribute

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD