public String getAttributeNamespaceUri(Object obj) { Attribute attr = (Attribute) obj; String uri = attr.getNamespaceURI(); if ( uri != null && uri.length() == 0 ) return null; else return uri; }
@Override String getNamespaceUri(Object node) { if (node instanceof Element) { return ((Element) node).getNamespaceURI(); } if (node instanceof Attribute) { return ((Attribute) node).getNamespaceURI(); } return null; }
public String getNamespaceURI() { String uri = attr.getNamespaceURI(); if (uri != null && uri.equals("")) { uri = null; } return uri; }
@Override String getNamespaceUri(Object node) { if (node instanceof Element) { return ((Element) node).getNamespaceURI(); } if (node instanceof Attribute) { return ((Attribute) node).getNamespaceURI(); } return null; }
String getNamespaceUri(Object node) { if(node instanceof Element) { return ((Element)node).getNamespaceURI(); } if(node instanceof Attribute) { return ((Attribute)node).getNamespaceURI(); } return null; }
@Override String getNamespaceUri(Object node) { if (node instanceof Element) { return ((Element) node).getNamespaceURI(); } if (node instanceof Attribute) { return ((Attribute) node).getNamespaceURI(); } return null; }
public String getAttributeNamespace(int i) { return getAttribute(i).getNamespaceURI(); }
public String getAttributeNamespace(int i) { return getAttribute(i).getNamespaceURI(); }
public String getAttributeNamespace(int i) { return getAttribute(i).getNamespaceURI(); }
/** * Return index of the <code>Attribute</code> with the * given name and uri. */ int indexOf(String name, Namespace namespace) { String uri = namespace.getURI(); if (elementData != null) { for (int i = 0; i < size; i++) { Attribute old = elementData[i]; String oldURI = old.getNamespaceURI(); String oldName = old.getName(); if (oldURI.equals(uri) && oldName.equals(name)) { return i; } } } return -1; }
public QName getAttributeName(int i) { Attribute at = getAttribute(i); return new QName(at.getNamespaceURI(), at.getName(), at.getNamespacePrefix()); }
public QName getAttributeName(int i) { Attribute at = getAttribute(i); return new QName(at.getNamespaceURI(), at.getName(), at.getNamespacePrefix()); }
public QName getAttributeName(int i) { Attribute at = getAttribute(i); return new QName(at.getNamespaceURI(), at.getName(), at.getNamespacePrefix()); }
Attribute attr = (Attribute)itr.next(); String attPrefix = attr.getNamespacePrefix(); String attUri = attr.getNamespaceURI();
private org.w3c.dom.Attr output(Attribute attribute, org.w3c.dom.Document domDoc) throws JDOMException { org.w3c.dom.Attr domAttr = null; try { if (attribute.getNamespace() == Namespace.NO_NAMESPACE) { // No namespace, use createAttribute if (forceNamespaceAware) { domAttr = domDoc.createAttributeNS(null, attribute.getQualifiedName()); } else { domAttr = domDoc.createAttribute(attribute.getQualifiedName()); } } else { domAttr = domDoc.createAttributeNS(attribute.getNamespaceURI(), attribute.getQualifiedName()); } domAttr.setValue(attribute.getValue()); } catch (Exception e) { throw new JDOMException("Exception outputting Attribute " + attribute.getQualifiedName(), e); } return domAttr; }
while (i.hasNext()) { Attribute a = (Attribute) i.next(); atts.addAttribute(a.getNamespaceURI(), a.getName(), a.getQualifiedName(),
Attribute attr = (Attribute)itr.next(); String attPrefix = attr.getNamespacePrefix(); String attUri = attr.getNamespaceURI();
String attUri = attr.getNamespaceURI();
domElement.setAttributeNS(attribute.getNamespaceURI(), attribute.getQualifiedName(), attribute.getValue());