Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| SWIXML 2.0 beta 1 (#201)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.swixml
Class Attribute

    java.lang.Object
      org.swixml.Attribute

    public class Attribute

extends Object

Class for store attribute info.

Author:
  Alex Buloichik

Field Summary
`protected String` | `name` Attribute name.
`protected String` | `value` Attribute value.

Constructor Summary
`Attribute(String name, String value)` Constructor.

Method Summary
`static Attribute` | `getAttribute(Element elem, String attrName)` Create class instance by name from element.
`static String` | `getAttributeValue(Element elem, String attrName)` Get attribute value from element.
`String` | `getName()`
`String` | `getValue()`
`void` | `setValue(String value)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### name

    protected final String name

  Attribute name.

### value

    protected String value

  Attribute value.

Constructor Detail

### Attribute

    public Attribute(String name,
                     String value)

  Constructor.

Method Detail

### getName

    public String getName()

### getValue

    public String getValue()

### setValue

    public void setValue(String value)

### getAttribute

    public static Attribute getAttribute(Element elem,
                                         String attrName)

  Create class instance by name from element.

  Parameters:
    `elem` - element for find attribute
    `attrName` - attribute name
  Returns:
    object or null if attribute doesn't declared in element

### getAttributeValue

    public static String getAttributeValue(Element elem,
                                           String attrName)

  Get attribute value from element.

  Parameters:
    `elem` - element for find attribute
    `attrName` - attribute name
  Returns:
    attribute value or null if attribute doesn't declared in element

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| SWIXML 2.0 beta 1 (#201)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 - 2011 - Wolf Paulus - wolfpaulus.com. All rights reserved.