Package org.eclipse.wst.xml.core.internal.contentmodel.util

Examples of org.eclipse.wst.xml.core.internal.contentmodel.util.DOMWriter$XMLVisitor


    contentBuilder.createDefaultRootContent(cmDocument, cmElementDeclaration, namespaceInfoList);

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, charset);

    DOMWriter domWriter = new DOMWriter(outputStreamWriter);

    // TODO... instead of relying on file extensions, we need to keep
    // track of the grammar type
    // better yet we should reate an SSE document so that we can format it
    // nicely before saving
    // then we won't need the DOMWriter at all
    //
    domWriter.print(xmlDocument, charset, cmDocument.getNodeName(), getNonWhitespaceString(getPublicId()), getNonWhitespaceString(getSystemId()));
    outputStream.flush();
    outputStream.close();

    return outputStream;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.contentmodel.util.DOMWriter$XMLVisitor

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.