Package org.apache.xerces.dom

Examples of org.apache.xerces.dom.CoreDocumentImpl


  public static Document makeDocument(
      Function<DOMImplementation, DocumentType> doctypeMaker, String features,
      DOMImplementation domImpl) {
    if (features != null) { throw new SomethingWidgyHappenedError(); }
    if (domImpl == null) {
      domImpl = new CoreDocumentImpl().getImplementation();
    }

    DocumentType doctype = doctypeMaker != null
        ? doctypeMaker.apply(domImpl) : null;
    return domImpl.createDocument(null, null, doctype);
View Full Code Here


    public void endDocument(Augmentations augs) throws XNIException {
        super.endDocument(augs);

        // If this is a DOM Level 3 implementation we should copy some information
        if (fDocumentImpl != null) { 
            CoreDocumentImpl doc = (CoreDocumentImpl)fDocument;
            doc.copyConfigurationProperties(fConfiguration);
        }

    } // endDocument()
View Full Code Here

    public void endDocument(Augmentations augs) throws XNIException {
        super.endDocument(augs);

        // If this is a DOM Level 3 implementation we should copy some information
        if (fDocumentImpl != null) { 
            CoreDocumentImpl doc = (CoreDocumentImpl)fDocument;
            doc.copyConfigurationProperties(fConfiguration);
        }

    } // endDocument()
View Full Code Here

  public static Document makeDocument(
      Function<DOMImplementation, DocumentType> doctypeMaker, String features,
      DOMImplementation domImpl) {
    if (features != null) { throw new SomethingWidgyHappenedError(); }
    if (domImpl == null) {
      domImpl = new CoreDocumentImpl().getImplementation();
    }

    DocumentType doctype = doctypeMaker != null
        ? doctypeMaker.apply(domImpl) : null;
    return domImpl.createDocument(null, null, doctype);
View Full Code Here

                fDOMParser.parse(mbis);
            else
                fDOMParser.parse(fInfo.fileName);
            Document doc = fDOMParser.getDocument();
            domCheckSum(doc);
            CoreDocumentImpl core = (CoreDocumentImpl) doc;
            DOMConfiguration config = core.getDomConfig();
            config.setParameter("validate", Boolean.TRUE);
            config.setParameter("schema-type", "http://www.w3.org/2001/XMLSchema");
            core.normalizeDocument();

        }
        else
        {
            // Do a SAX parse
View Full Code Here

     * the user data associated with child nodes (recursively).
     */
    private void fixUserData(Document previous, Node ret) {
      String key = NokogiriHelpers.ENCODED_STRING;
      for (Node child = ret.getFirstChild(); child != null; child = child.getNextSibling()) {
        CoreDocumentImpl previousDocument = (CoreDocumentImpl) previous;
        child.setUserData(key, previousDocument.getUserData(child, key), null);
        fixUserData(previous, child);
      }
    }
View Full Code Here

        IRubyObject doc = args[0];
        IRubyObject name = args[1];

        Document document = ((XmlNode) doc).getOwnerDocument();
        // FIXME: disable error checking as a workaround for #719. this depends on the internals of Xerces.
        CoreDocumentImpl internalDocument = (CoreDocumentImpl) document;
        boolean oldErrorChecking = internalDocument.getErrorChecking();
        internalDocument.setErrorChecking(false);
        Node node = document.createEntityReference(rubyStringToString(name));
        internalDocument.setErrorChecking(oldErrorChecking);
        setNode(context, node);
    }
View Full Code Here

  public static Document makeDocument(
      Function<DOMImplementation, DocumentType> doctypeMaker, String features,
      DOMImplementation domImpl) {
    if (features != null) { throw new SomethingWidgyHappenedError(); }
    if (domImpl == null) {
      domImpl = new CoreDocumentImpl().getImplementation();
    }

    DocumentType doctype = doctypeMaker != null
        ? doctypeMaker.apply(domImpl) : null;
    return domImpl.createDocument(null, null, doctype);
View Full Code Here

TOP

Related Classes of org.apache.xerces.dom.CoreDocumentImpl

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.