Example usage for org.jdom2 AttributeList add

List of usage examples for org.jdom2 AttributeList add

Introduction

In this page you can find the example usage for org.jdom2 AttributeList add.

Prototype

@Override
public boolean add(final Attribute attribute) 

Source Link

Document

Check and add attribute to the end of the list or replace an existing Attribute with the same name and Namespace.

Usage

From source file:org.jpos.q2.QFactory.java

License:Open Source License

public AttributeList getAttributeList(Element e) throws ConfigurationException {
    AttributeList attributeList = new AttributeList();
    List childs = e.getChildren("attr");
    for (Object child : childs) {
        Element childElement = (Element) child;
        String name = childElement.getAttributeValue("name");
        name = getAttributeName(name);/*from   ww w  .j a v  a 2  s.  com*/
        Attribute attr = new Attribute(name, getObject(childElement));
        attributeList.add(attr);
    }
    return attributeList;
}