Example usage for org.xml.sax.helpers NamespaceSupport getPrefixes

List of usage examples for org.xml.sax.helpers NamespaceSupport getPrefixes

Introduction

In this page you can find the example usage for org.xml.sax.helpers NamespaceSupport getPrefixes.

Prototype

public Enumeration<String> getPrefixes() 

Source Link

Document

Return an enumeration of all prefixes whose declarations are active in the current context.

Usage

From source file:org.geotools.util.XmlXpathUtilites.java

private static void addNamespaces(NamespaceSupport ns, JXPathContext context) {
    Enumeration<String> prefixes = ns.getPrefixes();
    while (prefixes.hasMoreElements()) {
        String prefix = prefixes.nextElement();
        String uri = ns.getURI(prefix);
        context.registerNamespace(prefix, uri);
    }//from  w ww.j a v  a  2  s  . c  om
}