Code example for NamespaceContext

Methods: getNamespaceURI

0
    if (colon + 1 >= string.length())
      throw new XMLStreamException(L.l("Invalid qualified name: {0}", string));
 
    String prefix = string.substring(0, colon);
    String localName = string.substring(colon + 1);
    String namespace = context.getNamespaceURI(prefix);
 
    if (NULL_NS_URI.equals(namespace))
      throw new XMLStreamException(L.l("No namespace for qualifed name: {0}", string));
 
    return new QName(namespace, localName, prefix);
  } 
 
  /** 
   * Ensures that a given namespace exists within the namespace context 
   * given. 
   **/ 
  public static void repairNamespace(XMLStreamWriter out, String namespace)
    throws XMLStreamException
Connect your IDE to all the code out there  Get Codota for Java