Package org.eclipse.wst.xml.core.internal.provisional.document

Examples of org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument.insertBefore()


        if (pi != null) {
          pi.setData(declaration);
        }
        else {
          pi = document.createProcessingInstruction("xml", declaration); //$NON-NLS-1$
          document.insertBefore(pi, child);
          insertBreak(model, child);
        }
      }

      if (publicId != null) {
View Full Code Here


            parent.removeChild(child);
          }
        }
        else {
          docType = (IDOMDocumentType) document.createDoctype(name);
          document.insertBefore(docType, child);
          insertBreak(model, child);
        }
        docType.setPublicId(publicId);
        if (entry != null) {
          String systemId = entry.getSystemId();
View Full Code Here

    if (preferences != null && preferences.getBoolean(XMLCorePreferenceNames.FIX_XML_DECLARATION)) {
      IDOMDocument document = ((DOMModelImpl) structuredModel).getDocument();
      if (!fixExistingXmlDecl(document)) {
        String encoding = preferences.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
        Node xml = document.createProcessingInstruction("xml", "version=\"1.0\" " + "encoding=\"" + encoding +"\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
        document.insertBefore(xml, document.getFirstChild());
      }
    }
    super.cleanupModel(structuredModel);
  }
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.