Package net.java.textilej.util

Examples of net.java.textilej.util.XmlStreamWriter


   
    OutlineItem root = parser.parse(textileSource);
   
    StringWriter out = new StringWriter(8096);
   
    XmlStreamWriter writer = createXmlStreamWriter(out);
   
    writer.writeStartDocument("utf-8","1.0");
   
    writer.writeStartElement("toc");
    writer.writeAttribute("topic", getHtmlFile());
    writer.writeAttribute("label", getBookTitle());
   
    emitToc(writer,root.getChildren());
   
    writer.writeEndElement(); // toc
   
    writer.writeEndDocument();
    writer.close();
   
    return out.toString();
   
  }
View Full Code Here


  public void setHtmlFile(String htmlFile) {
    this.htmlFile = htmlFile;
  }

  protected XmlStreamWriter createXmlStreamWriter(Writer out) {
    XmlStreamWriter writer = new DefaultXmlStreamWriter(out);
    return new FormattingXMLStreamWriter(writer);
  }
View Full Code Here

    super(writer);

  }
 
  protected XmlStreamWriter createFormattingXmlStreamWriter(Writer out) {
    XmlStreamWriter writer = super.createXmlStreamWriter(out);
    return new FormattingXMLStreamWriter(writer) {
      @Override
      protected boolean preserveWhitespace(String elementName) {
        return elementName.equals("pre") || elementName.equals("code");
      }
View Full Code Here

    this.writer = writer;

  }
 
  protected XmlStreamWriter createXmlStreamWriter(Writer out) {
    XmlStreamWriter writer = new DefaultXmlStreamWriter(out);
    return writer;
  }
View Full Code Here

    super(writer);
  }


  protected XmlStreamWriter createFormattingXmlStreamWriter(Writer out) {
    XmlStreamWriter writer = super.createXmlStreamWriter(out);
    return new FormattingXMLStreamWriter(writer) {
      @Override
      protected boolean preserveWhitespace(String elementName) {
        return elementName.equals("code") || elementName.startsWith("literal");
      }
View Full Code Here

    super(writer);
  }


  protected XmlStreamWriter createFormattingXmlStreamWriter(Writer out) {
    XmlStreamWriter writer = super.createXmlStreamWriter(out);
    return new FormattingXMLStreamWriter(writer) {
      @Override
      protected boolean preserveWhitespace(String elementName) {
        return elementName.equals("code") || elementName.startsWith("literal");
      }
View Full Code Here

   
    OutlineItem root = parser.parse(markupContent);
   
    StringWriter out = new StringWriter(8096);
   
    XmlStreamWriter writer = createXmlStreamWriter(out);
   
    writer.writeStartDocument("utf-8","1.0");
   
    writer.writeStartElement("toc");
    writer.writeAttribute("topic", getHtmlFile());
    writer.writeAttribute("label", getBookTitle());
   
    emitToc(writer,root.getChildren());
   
    writer.writeEndElement(); // toc
   
    writer.writeEndDocument();
    writer.close();
   
    return out.toString();
   
  }
View Full Code Here

  public void setHtmlFile(String htmlFile) {
    this.htmlFile = htmlFile;
  }

  protected XmlStreamWriter createXmlStreamWriter(Writer out) {
    XmlStreamWriter writer = new DefaultXmlStreamWriter(out);
    return new FormattingXMLStreamWriter(writer);
  }
View Full Code Here

    super(writer);

  }
 
  protected XmlStreamWriter createFormattingXmlStreamWriter(Writer out) {
    XmlStreamWriter writer = super.createXmlStreamWriter(out);
    return new FormattingXMLStreamWriter(writer) {
      @Override
      protected boolean preserveWhitespace(String elementName) {
        return elementName.equals("pre") || elementName.equals("code");
      }
View Full Code Here

    this.writer = writer;

  }
 
  protected XmlStreamWriter createXmlStreamWriter(Writer out) {
    XmlStreamWriter writer = new DefaultXmlStreamWriter(out);
    return writer;
  }
View Full Code Here

TOP

Related Classes of net.java.textilej.util.XmlStreamWriter

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.