List of utility methods to do XML QName
String | formatQName(QName qname) format Q Name if (!XMLConstants.DEFAULT_NS_PREFIX.equals(qname.getPrefix())) { return qname.getPrefix() + ":" + qname.getLocalPart(); } else { return qname.toString(); |
Class | getClassForDatatype(QName qname) get Class For Datatype return _classMap.get(qname);
|
String | getClassName(QName qname) Returns the className for a given qname e.g., {http://www.w3.org/2001/XMLSchema}decimal → org.w3.2001.XMLSchema.decimal try { StringBuilder className = new StringBuilder(); StringTokenizer st1 = new StringTokenizer(qname.getNamespaceURI(), "/"); st1.nextToken(); String domain = st1.nextToken(); StringTokenizer st2 = new StringTokenizer(domain, "."); List<String> lDomain = new ArrayList<String>(); while (st2.hasMoreTokens()) { ... |
List | getDirectChildElementsOnly(QName qName, Element element) get Direct Child Elements Only List<Element> elements = new ArrayList<>(); NodeList list = element.getChildNodes(); if (list == null || list.getLength() <= 0) { return elements; for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if (Node.ELEMENT_NODE == node.getNodeType()) { ... |
SOAPElement | getFirstChild(SOAPElement body, QName elementName) get First Child Iterator updateRequest = body.getChildElements(elementName); if (!updateRequest.hasNext()) return null; return (SOAPElement) updateRequest.next(); |
String | getKey(QName name) get Key if (name == null) { return null; final StringBuilder sb = new StringBuilder(); final String namespaceURI = name.getNamespaceURI(); if (!namespaceURI.equals(XMLConstants.NULL_NS_URI)) { sb.append("{").append(namespaceURI).append("}"); final String prefix = name.getPrefix(); if (!XMLConstants.DEFAULT_NS_PREFIX.equals(prefix)) { sb.append(prefix).append(":"); final String localPart = name.getLocalPart(); sb.append(localPart); return sb.toString(); |
String | getLocalAddress(QName port) get Local Address return "local://" + new File(System.getProperty("tempdir")).getAbsolutePath().replace('\\', '/') + '?' + port.getLocalPart(); |
T | getMatchingExtensionProvider(Map returns the matching Extension provider for a given QName/namespaceURI+prefix+localName combination QName subject; if (localName != null && prefix != null) { subject = new QName(namespaceURI, localName, prefix); } else if (localName != null) { subject = new QName(namespaceURI, localName); } else { return null; Set<QName> qNames = extensionMap.keySet(); for (QName qName : qNames) { if (subject.equals(qName)) { return extensionMap.get(qName); return null; |
String | getMediaTypeFromAttributes(Map Gets value of mediaType attribute. for (Entry<QName, String> attribute : attributes.entrySet()) { if (attribute.getKey().getLocalPart().equals("mediaType")) { return attribute.getValue(); return null; |
QName | getNodeQName(Node el) get Node Q Name String localName = el.getLocalName(); String namespaceUri = el.getNamespaceURI(); if (localName == null) { String nodeName = el.getNodeName(); int colonIndex = nodeName.indexOf(":"); if (colonIndex > 0) { localName = nodeName.substring(0, colonIndex); namespaceUri = nodeName.substring(colonIndex + 1); ... |