Examples of XMLDocumentSource


Examples of org.apache.xerces.xni.parser.XMLDocumentSource

            HTMLComponent component = (HTMLComponent)fHTMLComponents.elementAt(i);
            component.reset(this);
        }

        // configure pipeline
        XMLDocumentSource lastSource = fDocumentScanner;
        if (getFeature(BALANCE_TAGS)) {
            lastSource.setDocumentHandler(fTagBalancer);
            fTagBalancer.setDocumentSource(fDocumentScanner);
            lastSource = fTagBalancer;
        }
        if (getFeature(NAMESPACES)) {
            lastSource.setDocumentHandler(fNamespaceBinder);
            fNamespaceBinder.setDocumentSource(fTagBalancer);
            lastSource = fNamespaceBinder;
        }
        XMLDocumentFilter[] filters = (XMLDocumentFilter[])getProperty(FILTERS);
        if (filters != null) {
            for (int i = 0; i < filters.length; i++) {
                XMLDocumentFilter filter = filters[i];
                Class filterClass = filter.getClass();
                try {
                    Method filterMethod = filterClass.getMethod("setDocumentSource", DOCSOURCE);
                    if (filterMethod != null) {
                        filterMethod.invoke(filter, new Object[] { lastSource });
                    }
                }
                catch (IllegalAccessException e) {
                    // ignore
                }
                catch (InvocationTargetException e) {
                    // ignore
                }
                catch (NoSuchMethodException e) {
                    // ignore
                }
                lastSource.setDocumentHandler(filter);
                lastSource = filter;
            }
        }
        lastSource.setDocumentHandler(fDocumentHandler);

    } // reset()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.