Package tools.com.sun.enterprise.util

Examples of tools.com.sun.enterprise.util.XMLValidationHandler


                    try {
                        builder = factory.newDocumentBuilder();
                    } catch (ParserConfigurationException e) {
                        logger.log(Level.SEVERE, e.getMessage());
                    }
                    EntityResolver dh = new XMLValidationHandler(true);
                    ErrorHandler eh = new XMLValidationHandler(true);
                    builder.setErrorHandler(eh);
                    builder.setEntityResolver(dh);
                    uninitialised = true;
                }
            }
View Full Code Here


            SAXParserFactory spf = SAXParserFactory.newInstance();
            spf.setValidating(true);
            // ValidatingParser p = new ValidatingParser();
            XMLReader p = spf.newSAXParser().getXMLReader();
//            XMLErrorHandler eh = new XMLErrorHandler(null);
            p.setErrorHandler(new XMLValidationHandler());
            p.parse(source);
            return true;

        } catch (Exception e) {
            return false;
View Full Code Here

    protected void createDOMObject(InputSource source, String dd)
            throws ParserConfigurationException, SAXException, IOException {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setNamespaceAware(true);
        DocumentBuilder builder = factory.newDocumentBuilder();
        EntityResolver dh = new XMLValidationHandler(false);
        builder.setEntityResolver(dh);
        Document document = builder.parse(source);

        if ((dd.indexOf("sun-")) < 0) { // NOI18N
            if ((dd.indexOf("webservices")) < 0) { // NOI18N
View Full Code Here

  smh = StringManagerHelper.getLocalStringsManager();
  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  try {
       factory.setAttribute("http://apache.org/xml/features/allow-java-encodings", new Boolean(true));
      builder = factory.newDocumentBuilder();
      EntityResolver dh = new XMLValidationHandler(false);
      builder.setEntityResolver(dh);
  } catch (ParserConfigurationException e) {
      logger.log(Level.SEVERE, getClass().getName() + ".Exception",
        new Object[] {e.toString()});
      result.failed(smh.getLocalString
View Full Code Here

TOP

Related Classes of tools.com.sun.enterprise.util.XMLValidationHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.