Example usage for org.jdom2 Element getNamespace

List of usage examples for org.jdom2 Element getNamespace

Introduction

In this page you can find the example usage for org.jdom2 Element getNamespace.

Prototype

public Namespace getNamespace(final String prefix) 

Source Link

Document

Returns the Namespace corresponding to the given prefix in scope for this element.

Usage

From source file:uk.ac.ox.oucs.vle.xcri.oxcap.Subject.java

License:Educational Community License

@Override
public void fromXml(Element element) throws InvalidElementException {
    super.fromXml(element);
    String identifier = element.getAttributeValue("identifier");
    if (identifier != null) {
        this.setIdentifier(identifier);
    }//  w  w w. j  a  va2s .co m
    String value = element.getAttributeValue("type", XSI);
    if (value != null) {
        String[] bits = value.split(":");
        if (bits.length == 2) {
            this.setCategoryNamespace(element.getNamespace(bits[0]));
        }
    }
}