Package org.apache.xerces.dom

Examples of org.apache.xerces.dom.DocumentImpl


        // log("password : " + dbPassword);
        log("schema : " + dbSchema);

        DocumentTypeImpl docType = new DocumentTypeImpl(null, "database", null,
                DTDResolver.WEB_SITE_DTD);
        doc = new DocumentImpl(docType);
        doc.appendChild(doc.createComment(
                " Autogenerated by JDBCToXMLSchema! "));

        try
        {
View Full Code Here


        System.err.println("driver : "+dbDriver);
        System.err.println("URL : "+dbUrl);
        System.err.println("user : "+dbUser);
        System.err.println("password : "+dbPassword);

        doc = new DocumentImpl();
        doc.appendChild(doc.createComment(" Autogenerated by JDBCToXMLSchema! "));

        try
        {
            generateXML();
View Full Code Here

     * @throws SAXException Thrown by handler to signal an error.
     */
    public void startDocument() throws SAXException {

        fInDocument = true;
        fDocument = new DocumentImpl();
        fCurrentNode = fDocument;

    } // startDocument()
View Full Code Here

     * @throws SAXException Thrown by handler to signal an error.
     */
    public void doctypeDecl(String rootElement, String publicId, String systemId)
        throws SAXException {
       
        DocumentImpl docimpl = (DocumentImpl)fDocument;
        DocumentType doctype = docimpl.createDocumentType(rootElement, publicId, systemId);
        fCurrentNode.appendChild(doctype);

    } // doctypeDecl(String,String,String)
View Full Code Here

    /**
     * Create a new Document object with a specified DOCTYPE, public ID and
     * system ID.
     */
    public Document newDocument(String name, String pub, String sys) {
        DocumentImpl doc=new DocumentImpl();
        if ((pub!=null)||(sys!=null)) {
            DocumentTypeImpl dtd=new DocumentTypeImpl(doc,name,pub,sys);
            doc.appendChild(dtd);
        } else if (name!=null) {
            DocumentTypeImpl dtd=new DocumentTypeImpl(doc,name);
            doc.appendChild(dtd);
        }
        return(doc);
    }
View Full Code Here

            }

            // full expansion
            else {
                if (isDocumentImpl) {
                    fDocumentImpl = new DocumentImpl(fGrammarAccess);
                    fDocument = fDocumentImpl;
                    // set DOM error checking off
                    fDocumentImpl.setErrorChecking(false);
                }
                else {
View Full Code Here

   */
  public void save() throws IOException {
    try {
      final FileOutputStream fos = new FileOutputStream(new File(configfile
          .getFile()));
      final Document doc = new DocumentImpl();
      final Element collections = doc
          .createElement(Subcollection.TAG_COLLECTIONS);
      final Iterator iterator = collectionMap.values().iterator();

      while (iterator.hasNext()) {
        final Subcollection subCol = (Subcollection) iterator.next();
        final Element collection = doc
            .createElement(Subcollection.TAG_COLLECTION);
        collections.appendChild(collection);
        final Element name = doc.createElement(Subcollection.TAG_NAME);
        name.setNodeValue(subCol.getName());
        collection.appendChild(name);
        final Element whiteList = doc
            .createElement(Subcollection.TAG_WHITELIST);
        whiteList.setNodeValue(subCol.getWhiteListString());
        collection.appendChild(whiteList);
        final Element blackList = doc
            .createElement(Subcollection.TAG_BLACKLIST);
        blackList.setNodeValue(subCol.getBlackListString());
        collection.appendChild(blackList);
      }

View Full Code Here

        throws XNIException {

        fInDocument = true;
        if (!fDeferNodeExpansion) {
            if (fDocumentClassName.equals(DEFAULT_DOCUMENT_CLASS_NAME)) {
                fDocument = new DocumentImpl();
                fDocumentImpl = (CoreDocumentImpl)fDocument;
                // REVISIT: when DOM Level 3 is REC rely on Document.support
                //          instead of specific class
                // set DOM error checking off
                fDocumentImpl.setStrictErrorChecking(false);
View Full Code Here

        }
        else {
            sendIndentedElement("psv:annotation");
            // We can't get all the information from DOM, but I've outputed what
            // we can get -- PJM
            Node dom = new DocumentImpl();
            ann.writeAnnotation(dom, XSAnnotation.W3C_DOM_DOCUMENT);

            // this child will be the annotation element
            Element annot = DOMUtil.getFirstChildElement(dom);
View Full Code Here

    /** Start of DTD. */
    public void callStartDTD() throws Exception {
       
        // setup grammar document
        setGrammarDocument(null);
        fGrammarDocument = new DocumentImpl();
        fRootElement = fGrammarDocument.createElement("dtd");
        fCurrentElement = fRootElement;

    } // callStartDTD()
View Full Code Here

TOP

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

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.