Example usage for org.xml.sax Attributes getValue

List of usage examples for org.xml.sax Attributes getValue

Introduction

In this page you can find the example usage for org.xml.sax Attributes getValue.

Prototype

public abstract String getValue(String qName);

Source Link

Document

Look up an attribute's value by XML qualified (prefixed) name.

Usage

From source file:Main.java

public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException {
    if (qName.equals("order")) {
        String date = attrs.getValue("date");
        String number = attrs.getValue("number");
        System.out.println("Order #" + number + " date is '" + date + "'");
    }/*  w  w w .j a v a2  s  . co m*/
}

From source file:at.tuwien.minimee.registry.xml.EngineFactory.java

@Override
public Object createObject(Attributes arg0) throws Exception {
    String classname = (arg0.getValue("class"));
    return Class.forName(classname).newInstance();
}

From source file:eu.planets_project.pp.plato.xml.plato.CriterionCategoryFactory.java

@Override
public Object createObject(Attributes arg0) throws Exception {
    String name = arg0.getValue("name");
    if (name != null) {
        return CriterionCategory.valueOf(name);
    }//from   w w w. j  av a 2s .  co m
    return null;
}

From source file:eu.planets_project.pp.plato.xml.plato.SampleAggregationModeFactory.java

@Override
public Object createObject(Attributes arg0) throws Exception {
    String value = (arg0.getValue("value"));
    return SampleAggregationMode.valueOf(value);
}

From source file:eu.planets_project.pp.plato.xml.plato.TransformationModeFactory.java

@Override
public Object createObject(Attributes arg0) throws Exception {
    String value = (arg0.getValue("value"));
    return TransformationMode.valueOf(value);
}

From source file:eu.scape_project.planning.xml.plan.SampleAggregationModeFactory.java

@Override
public SampleAggregationMode createObject(Attributes arg0) throws Exception {
    String value = (arg0.getValue("value"));
    return SampleAggregationMode.valueOf(value);
}

From source file:eu.scape_project.planning.xml.plan.TransformationModeFactory.java

@Override
public TransformationMode createObject(Attributes arg0) throws Exception {
    String value = (arg0.getValue("value"));
    return TransformationMode.valueOf(value);
}

From source file:eu.planets_project.pp.plato.xml.plato.GoDecisionFactory.java

@Override
public Object createObject(Attributes arg0) throws Exception {
    String decision = (arg0.getValue("value"));
    return GoDecision.valueOf(decision);
}

From source file:com.discursive.jccook.xml.bean.EmailRule.java

public void begin(Attributes attributes) throws Exception {
    to = attributes.getValue("to");
    from = attributes.getValue("from");
}

From source file:com.terradue.jcatalogue.client.internal.digester.OpenSearchUrlCreationFactory.java

@Override
public OpenSearchUrl createObject(Attributes attributes) throws Exception {
    String type = attributes.getValue("type");
    String template = attributes.getValue("template");

    return new OpenSearchUrl(type, template);
}