All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdc.applic.s1000d.core.DataXmlSource Maven / Gradle / Ivy

The newest version!
package cdc.applic.s1000d.core;

import cdc.applic.s1000d.XmlSource;
import cdc.io.data.Element;

/**
 * Implementation of {@link XmlSource} based on {@link Element}.
 *
 * @author Damien Carbonne
 */
public class DataXmlSource implements XmlSource {
    public DataXmlSource() {
        super();
    }

    @Override
    public Iterable getChildren(Element parent) {
        return parent.getChildren(Element.class);
    }

    @Override
    public String getName(Element element) {
        return element.getName();
    }

    @Override
    public String getAttributeValue(Element element,
                                    String name,
                                    String def) {
        return element.getAttributeValue(name, def);
    }

    @Override
    public String getElementContent(Element element) {
        return element.getText();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy