List of utility methods to do XML Element Namespace
String | resolveNamespacePrefix(String prefix, Element element) resolve Namespace Prefix String namespace = null; if ("".equals(prefix)) { namespace = element.getAttribute("xmlns"); } else { namespace = element.getAttribute("xmlns:" + prefix); if (namespace != null && !"".equals(namespace)) { return namespace; ... |
void | writeEndElement(XMLStreamWriter out, String prefix, String namespaceURI) Write an end element removing the namespace binding if necessary out.writeEndElement(); if (namespaceURI != null) { String resetNamespace = (namespaceURI.length() == 0 ? UNBOUND_NAMESPACE : namespaceURI); if (prefix.length() == 0) { out.setDefaultNamespace(resetNamespace); } else { out.setPrefix(prefix, resetNamespace); |
void | writeStartElement(XMLStreamWriter writer, String prefix, String namespaceURI, String nodeName) If namespaceURI is null, this method calls writer.writeStartElement without namespaceURI argument. if (namespaceURI != null) { if (prefix != null && !NO_PREFIX.equals(prefix)) { writer.writeStartElement(prefix, nodeName, namespaceURI); } else { writer.writeStartElement(namespaceURI, nodeName); } else { writer.writeStartElement(nodeName); ... |