Code example for SAXNotSupportedException

    public void parse(InputSource input) throws IOException, SAXException {
        if (processNamespacePrefixes && processNamespaces) {
             * Expat has XML_SetReturnNSTriplet, but that still doesn't 
             * include xmlns attributes like this feature requires. We may 
             * have to implement namespace processing ourselves if we want 
             * this (not too difficult). We obviously "support" namespace 
             * prefixes if namespaces are disabled. 
            throw new SAXNotSupportedException("The 'namespace-prefix' " +
                    "feature is not supported while the 'namespaces' " + 
                    "feature is enabled."); 
        // Try the character stream. 
        Reader reader = input.getCharacterStream();
        if (reader != null) {
            try { 
                parse(reader, input.getPublicId(), input.getSystemId());
Experience pair programming with AI  Get Codota for Java