Examples of SMOutputFactory


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

Examples of org.codehaus.staxmate.SMOutputFactory

  }

  @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

Examples of org.codehaus.staxmate.SMOutputFactory

  }

  @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

Examples of org.codehaus.staxmate.SMOutputFactory

  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

Examples of org.codehaus.staxmate.SMOutputFactory

  }

  @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
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.