public String getAttributeNamespaceUri(Object obj) { Attribute attr = (Attribute) obj; String uri = attr.getNamespaceURI(); if ( uri == null) return ""; 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 getAttributeNamespaceUri(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return attribute.getNamespaceURI(); } } return null; }
protected Attribute attribute(String namespaceURI, String localName) { List<Attribute> attributes = attributeList(); int size = attributes.size(); for (Attribute attribute : attributes) { if (localName.equals(attribute.getName()) && (((namespaceURI == null || namespaceURI.length() == 0) && ((attribute.getNamespaceURI() == null) || (attribute.getNamespaceURI().length() == 0))) || ((namespaceURI != null) && namespaceURI .equals(attribute.getNamespaceURI())))) { return attribute; } } return null; }
public String getAttributeValueFromName(String namespaceURI, String localName) { if (element != null) { for (Iterator<Attribute> iter = element.attributeIterator(); iter.hasNext();) { Attribute attribute = iter.next(); if (namespaceURI.equals(attribute.getNamespaceURI()) && localName.equals(attribute.getName())) { return attribute.getValue(); } } } return null; }
protected Attributes createAttributes(Element element, Attributes namespaceAttributes) throws SAXException { attributes.clear(); if (namespaceAttributes != null) { attributes.setAttributes(namespaceAttributes); } for (Iterator<Attribute> iter = element.attributeIterator(); iter.hasNext();) { Attribute attribute = iter.next(); attributes.addAttribute(attribute.getNamespaceURI(), attribute .getName(), attribute.getQualifiedName(), "CDATA", attribute.getValue()); } return attributes; }
String attUri = attribute.getNamespaceURI(); String attName = attribute.getQualifiedName(); String value = attribute.getValue();
Name(Attribute el) { // thank dom4j for this code duplication qualifiedName = el.getQualifiedName(); namespaceURI = getNamespaceURI(el.getNamespaceURI()); } Name(Namespace ns) {
public String getAttributeNamespaceUri(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return attribute.getNamespaceURI(); } } return null; }
public String getAttributeNamespaceUri(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return attribute.getNamespaceURI(); } } return null; }
public String getAttributeNamespaceUri(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return attribute.getNamespaceURI(); } } return null; }
public String getAttributeNamespaceUri(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return attribute.getNamespaceURI(); } } return null; }
public String getAttributeNamespaceUri(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return attribute.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; }
public String getAttributeNamespaceUri(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return attribute.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; }
@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 getAttributeNamespaceUri(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return attribute.getNamespaceURI(); } } return null; }
public String getAttributeValueFromName(String namespaceURI, String localName) { if (element != null) { for (Iterator<Attribute> iter = element.attributeIterator(); iter.hasNext();) { Attribute attribute = iter.next(); if (namespaceURI.equals(attribute.getNamespaceURI()) && localName.equals(attribute.getName())) { return attribute.getValue(); } } } return null; }
protected Attributes createAttributes(Element element, Attributes namespaceAttributes) throws SAXException { attributes.clear(); if (namespaceAttributes != null) { attributes.setAttributes(namespaceAttributes); } for (Iterator iter = element.attributeIterator(); iter.hasNext();) { Attribute attribute = (Attribute) iter.next(); attributes.addAttribute(attribute.getNamespaceURI(), attribute .getName(), attribute.getQualifiedName(), "CDATA", attribute.getValue()); } return attributes; }