Package org.codehaus.staxmate

Examples of org.codehaus.staxmate.SMOutputFactory


  public static String toXML(XMLNode xmlNode) {

    String xml = "";
    StringWriter stream = new StringWriter();
   
    SMOutputFactory smFactory = new SMOutputFactory(WstxOutputFactory
        .newInstance());

    try {
      XMLStreamWriter writer = smFactory.createStax2Writer(stream);
     
//      writer.writeCharacters("\n");

      XMLNodeWriter xmlNodewriter = new XMLNodeWriter(writer, "");
View Full Code Here


  }

  @Override
  public void serialize( @Nonnull T object, @Nonnull OutputStream out ) throws IOException {
    try {
      SMOutputFactory factory = StaxMateSupport.getSmOutputFactory();
      SMOutputDocument doc = factory.createOutputDocument( out );
      if (! StaxMateSupport.isJsonEnabled() ) {
        doc.setIndentation( INDENT_STR, 1, 2 );
      }

      String nameSpaceUri = getNameSpace();
View Full Code Here

  }

  @Override
  public void serialize( @Nonnull T object, @Nonnull OutputStream out ) throws IOException {
    try {
      SMOutputFactory factory = StaxMateSupport.getSmOutputFactory();
      SMOutputDocument doc = factory.createOutputDocument( out );
      if (! StaxMateSupport.isJsonEnabled() ) {
        doc.setIndentation( INDENT_STR, 1, 2 );
      }

      String nameSpaceUri = getNameSpace();
View Full Code Here

  public static String toMathML(ASTNode astNode) {

    String mathML = "";
    StringWriter stream = new StringWriter();
   
    SMOutputFactory smFactory = new SMOutputFactory(WstxOutputFactory
        .newInstance());
   
    try {
      XMLStreamWriter writer = smFactory.createStax2Writer(stream);
      MathMLXMLStreamCompiler compiler = new MathMLXMLStreamCompiler(writer, "  ");
      boolean isSBMLNamespaceNeeded = compiler.isSBMLNamespaceNeeded(astNode);
     
      writer.writeStartDocument();
      writer.writeCharacters("\n");
View Full Code Here

  }

  @Override
  public void serialize( @Nonnull T object, @Nonnull OutputStream out ) throws IOException {
    try {
      SMOutputFactory factory = StaxMateSupport.getSmOutputFactory();
      SMOutputDocument doc = factory.createOutputDocument( out );
      if (! StaxMateSupport.isJsonEnabled() ) {
        doc.setIndentation( INDENT_STR, 1, 2 );
      }

      String nameSpaceUri = getNameSpace();
View Full Code Here

TOP

Related Classes of org.codehaus.staxmate.SMOutputFactory

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.