List of utility methods to do XML QName Get
QName | getQNameFromString(Element element, String qnameAsString) get Q Name From String if (qnameAsString == null || element == null) { return null; int colonIndex = qnameAsString.indexOf(":"); String prefix = qnameAsString.substring(0, colonIndex); String localName = qnameAsString.substring(colonIndex + 1); String ns = getNamespaceURI(element, prefix); return new QName(ns, localName, prefix); ... |
QName | getQNameFromString(Object obj) Return a QName from the String passed in of the form {ns}element String value; if (obj instanceof QName) { return (QName) obj; } else { value = obj.toString(); int open = value.indexOf('{'); int close = value.indexOf('}'); ... |
int | getQNameHashCode(QName aQName) Gets the hash code of a QName. return ("{" + aQName.getNamespaceURI() + "}" + aQName.getLocalPart()).hashCode(); |
T | getQNameType(List get Q Name Type for (int i = 0; i < objects.size(); i++) { Object o = objects.get(i); if (o instanceof JAXBElement) { JAXBElement<?> jaxbElement = (JAXBElement<?>) o; if (jaxbElement.getName().equals(qName)) { return (T) jaxbElement.getValue(); return null; |
QName | getQNameWithBackslashedLocal(QName suspectQName) get Q Name With Backslashed Local String trustedString = null;
trustedString = applyBackslashes(suspectQName.getLocalPart());
return getQNameWithDifferentLocal(suspectQName, trustedString);
|
QName | getQNameWithDifferentLocal(QName qName, String localName) get Q Name With Different Local QName trustedQName = null; trustedQName = new QName(qName.getNamespaceURI(), localName, qName.getPrefix()); return trustedQName; |