Search in sources :

Example 1 with XmlQName

use of org.camunda.bpm.model.xml.impl.util.XmlQName in project camunda-xml-model by camunda.

the class DomElementImpl method getAttribute.

public String getAttribute(String namespaceUri, String localName) {
    synchronized (document) {
        XmlQName xmlQName = new XmlQName(this, namespaceUri, localName);
        String value;
        if (xmlQName.hasLocalNamespace()) {
            value = element.getAttributeNS(null, xmlQName.getLocalName());
        } else {
            value = element.getAttributeNS(xmlQName.getNamespaceUri(), xmlQName.getLocalName());
        }
        if (value.isEmpty()) {
            return null;
        } else {
            return value;
        }
    }
}
Also used : XmlQName(org.camunda.bpm.model.xml.impl.util.XmlQName)

Example 2 with XmlQName

use of org.camunda.bpm.model.xml.impl.util.XmlQName in project camunda-xml-model by camunda.

the class DomDocumentImpl method createElement.

public DomElement createElement(String namespaceUri, String localName) {
    synchronized (document) {
        XmlQName xmlQName = new XmlQName(this, namespaceUri, localName);
        Element element = document.createElementNS(xmlQName.getNamespaceUri(), xmlQName.getPrefixedName());
        return new DomElementImpl(element);
    }
}
Also used : XmlQName(org.camunda.bpm.model.xml.impl.util.XmlQName) Element(org.w3c.dom.Element) DomElement(org.camunda.bpm.model.xml.instance.DomElement)

Aggregations

XmlQName (org.camunda.bpm.model.xml.impl.util.XmlQName)2 DomElement (org.camunda.bpm.model.xml.instance.DomElement)1 Element (org.w3c.dom.Element)1