SWIXML
2.0 beta 1 (#201)

org.swixml
Class Attribute

java.lang.Object
  extended by 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

SWIXML
2.0 beta 1 (#201)

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