public int findAttributeIndex(String nsURI, String localName) { if ("".equals(nsURI)) { nsURI = null; } for (int i = 0, len = getAttributeCount(); i < len; ++i) { if (getAttributeLocalName(i).equals(localName)) { String otherUri = getAttributeNamespace(i); if (nsURI == null) { if (otherUri == null || otherUri.length() == 0) { return i; } } else { if (nsURI.equals(otherUri)) { return i; } } } } return -1; }
public int findAttributeIndex(String nsURI, String localName) { if ("".equals(nsURI)) { nsURI = null; } for (int i = 0, len = getAttributeCount(); i < len; ++i) { if (getAttributeLocalName(i).equals(localName)) { String otherUri = getAttributeNamespace(i); if (nsURI == null) { if (otherUri == null || otherUri.length() == 0) { return i; } } else { if (nsURI.equals(otherUri)) { return i; } } } } return -1; }
public int findAttributeIndex(String nsURI, String localName) { if ("".equals(nsURI)) { nsURI = null; } for (int i = 0, len = getAttributeCount(); i < len; ++i) { if (getAttributeLocalName(i).equals(localName)) { String otherUri = getAttributeNamespace(i); if (nsURI == null) { if (otherUri == null || otherUri.length() == 0) { return i; } } else { if (nsURI.equals(otherUri)) { return i; } } } } return -1; }
public int findAttributeIndex(String nsURI, String localName) { if ("".equals(nsURI)) { nsURI = null; } for (int i = 0, len = getAttributeCount(); i < len; ++i) { if (getAttributeLocalName(i).equals(localName)) { String otherUri = getAttributeNamespace(i); if (nsURI == null) { if (otherUri == null || otherUri.length() == 0) { return i; } } else { if (nsURI.equals(otherUri)) { return i; } } } } return -1; }