|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.AbstractWriter
javax.swing.text.html.HTMLWriter
freemind.main.FixedHTMLWriter
freemind.main.XHTMLWriter
public class XHTMLWriter
Create a new XHTMLWriter which is able to save a HTMLDocument as XHTML.
The result will be a valid XML file, but it is not granted that the file will really be XHTML 1.0 transitional conformous. The basic purpose of this class is to give an XSL processor access to plain HTML files.
Nested Class Summary | |
---|---|
static class |
XHTMLWriter.XHTMLFilterWriter
This FilterWriter will convert the output of Swing's HTMLWriter to XHTML format. |
Field Summary |
---|
Fields inherited from class javax.swing.text.AbstractWriter |
---|
NEWLINE |
Constructor Summary | |
---|---|
XHTMLWriter(java.io.Writer writer,
javax.swing.text.html.HTMLDocument doc)
Create a new XHTMLWriter that will write the entire HTMLDocument. |
|
XHTMLWriter(java.io.Writer writer,
javax.swing.text.html.HTMLDocument doc,
int pos,
int len)
Create a new XHTMLWriter that will write a part of a HTMLDocument. |
Method Summary | |
---|---|
static void |
html2xhtml(java.io.Reader reader,
java.io.Writer writer)
Read HTML from the Reader, and send XHTML to the writer. |
static void |
main(java.lang.String[] args)
External call to convert a source HTML file to a target XHTML file. |
void |
write()
Start the writing process. |
protected void |
writeLineSeparator()
|
protected void |
writeOption(javax.swing.text.html.Option option)
|
Methods inherited from class freemind.main.FixedHTMLWriter |
---|
writeAttributes |
Methods inherited from class javax.swing.text.html.HTMLWriter |
---|
closeOutUnwantedEmbeddedTags, comment, emptyTag, endTag, isBlockTag, matchNameAttribute, output, selectContent, startTag, synthesizedElement, text, textAreaContent, writeEmbeddedTags |
Methods inherited from class javax.swing.text.AbstractWriter |
---|
decrIndent, getCanWrapLines, getCurrentLineLength, getDocument, getElementIterator, getEndOffset, getIndentLevel, getIndentSpace, getLineLength, getLineSeparator, getStartOffset, getText, getWriter, incrIndent, indent, inRange, isLineEmpty, setCanWrapLines, setCurrentLineLength, setIndentSpace, setLineLength, setLineSeparator, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XHTMLWriter(java.io.Writer writer, javax.swing.text.html.HTMLDocument doc)
writer
- Writer to write todoc
- Source documentpublic XHTMLWriter(java.io.Writer writer, javax.swing.text.html.HTMLDocument doc, int pos, int len)
writer
- Writer to write todoc
- Source documentpos
- Starting positionlen
- LengthMethod Detail |
---|
public void write() throws java.io.IOException, javax.swing.text.BadLocationException
write
in class javax.swing.text.html.HTMLWriter
java.io.IOException
javax.swing.text.BadLocationException
protected void writeOption(javax.swing.text.html.Option option) throws java.io.IOException
writeOption
in class javax.swing.text.html.HTMLWriter
java.io.IOException
protected void writeLineSeparator() throws java.io.IOException
writeLineSeparator
in class javax.swing.text.html.HTMLWriter
java.io.IOException
public static void html2xhtml(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException, javax.swing.text.BadLocationException
reader
- HTML sourcewriter
- XHTML target
java.io.IOException
javax.swing.text.BadLocationException
public static void main(java.lang.String[] args)
Usage: java XHTMLWriter <source file> <target file>
args
- Shell arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |