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

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


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


    Preferences preferences = getModelPreferences();
    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.