Package org.apache.xerces.parsers

Examples of org.apache.xerces.parsers.StandardParserConfiguration

  • Properties @author Arnaud Le Hors, IBM @author Andy Clark, IBM @version $Id: StandardParserConfiguration.java,v 1.27 2002/09/27 14:15:08 neeraj Exp $

  •      * Constructor
         * 
         * @param theFactory custom factory to use for model class lookup
         */
        public XMLParser(ModelClassFactory theFactory) {
            parser = new DOMParser(new StandardParserConfiguration());
            try {
                parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
            }
            catch (Exception e) {
                log.error("Can't exclude whitespace from XML DOM", e);
    View Full Code Here


            // REVISIT: do we use shadowed or synchronized symbol table of
            //          SchemaSymbols.fSymbolTable?
            // REVISIT: don't use SchemaConfiguration internally
            //          we will get stack overflaw because
            //          XMLSchemaValidator will be instantiating XSDHandler...
            fSchemaParser = new DOMParser(new StandardParserConfiguration(new SchemaSymbols.SchemaSymbolTable()));
            // set ErrorHandler and EntityResolver (doesn't seem that
            // XMLErrorHandler or XMLEntityResolver will work with
            // standard DOMParser...
            //REVISIT: disable deferred dom expansion. there are bugs.
            try {
    View Full Code Here

        /**
         * Constructs a DOM parser using the dtd/xml schema parser configuration.
         */
        public DOMParser() {
            super(new StandardParserConfiguration(new SchemaSymbols.SchemaSymbolTable()));
            try {
                // use our own document implementation
                setProperty(DOCUMENT_CLASS, "org.apache.xerces.impl.xs.dom.DocumentImpl");
                // don't defer DOM expansion
                setFeature(DEFER_EXPANSION, false);
    View Full Code Here

         * Constructor
         * 
         * @param theFactory custom factory to use for model class lookup
         */
        public XMLParser(ModelClassFactory theFactory) {
            parser = new DOMParser(new StandardParserConfiguration());
            try {
                parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
            }
            catch (Exception e) {
                log.error("Can't exclude whitespace from XML DOM", e);
    View Full Code Here

         * Returns a semantic equivalent of a given XML-encoded message in a default format.
         * Attributes, comments, and processing instructions are not considered to change the
         * HL7 meaning of the message, and are removed in the standardized representation.   
         */
        public static String standardizeXML(String message) throws SAXException {
            DOMParser parser = new DOMParser(new StandardParserConfiguration());
            parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
           
            Document doc = null;
            StringWriter out = new StringWriter();
            try {
    View Full Code Here

       */
      public ProfileParser(boolean alwaysValidateAgainstDTD) {

        this.alwaysValidate = alwaysValidateAgainstDTD;

        parser = new DOMParser(new StandardParserConfiguration());
        try {
          parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
        } catch (Exception e) {
          log.error("Can't exclude whitespace from XML DOM", e);
        }
    View Full Code Here

        
         * @param theFactory custom factory to use for model class lookup
         */
        public XMLParser(ModelClassFactory theFactory) {
          super(theFactory);
            parser = new DOMParser(new StandardParserConfiguration());
            try {
                parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
            }
            catch (Exception e) {
                log.error("Can't exclude whitespace from XML DOM", e);
    View Full Code Here

         * Constructor
         * 
         * @param theFactory custom factory to use for model class lookup
         */
        public XMLParser(ModelClassFactory theFactory) {
            parser = new DOMParser(new StandardParserConfiguration());
            try {
                parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
            }
            catch (Exception e) {
                log.error("Can't exclude whitespace from XML DOM", e);
    View Full Code Here

       */
      public ProfileParser(boolean alwaysValidateAgainstDTD) {

        this.alwaysValidate = alwaysValidateAgainstDTD;

        parser = new DOMParser(new StandardParserConfiguration());
        try {
          parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
        } catch (Exception e) {
          log.error("Can't exclude whitespace from XML DOM", e);
        }
    View Full Code Here

            // REVISIT: do we use shadowed or synchronized symbol table of
            //          SchemaSymbols.fSymbolTable?
            // REVISIT: don't use SchemaConfiguration internally
            //          we will get stack overflaw because
            //          XMLSchemaValidator will be instantiating XSDHandler...
            fSchemaParser = new DOMParser(new StandardParserConfiguration(new SchemaSymbols.SchemaSymbolTable()));
            // set ErrorHandler and EntityResolver (doesn't seem that
            // XMLErrorHandler or XMLEntityResolver will work with
            // standard DOMParser...
            //REVISIT: disable deferred dom expansion. there are bugs.
            try {
    View Full Code Here

    TOP

    Related Classes of org.apache.xerces.parsers.StandardParserConfiguration

    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.