String (final CharSequence tagName) { final String namespacePrefix; int pos = StringUtil.indexOf(tagName, ':'); if (pos == -1) { namespacePrefix = ""; } else { namespacePrefix = tagName.subSequence(0, pos).toString(); } for (int i = myPrefixesStack.size() - 1; i >= 0; i--) { if (namespacePrefix.equals(myPrefixesStack.get(i))) return myNamespacesStack.get(i); } return ""; }