|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.xml.TagIsolator
public class TagIsolator
"Isolates" XML tags and textual contents in an XML/HTML document by printing each XML/HTML tag on a single line. This class is thread-safe.
Field Summary | |
---|---|
static String |
LINE_SEPARATOR_CLASS
The character class of line separators. |
static String |
SINGLE_LINE_WHITESPACE
The class of whitespace characters that are not line separators. |
Constructor Summary | |
---|---|
TagIsolator()
Creates a new instance. |
Method Summary | |
---|---|
void |
isolateTags(Reader reader,
Writer writer)
"Isolates" XML tags and textual contents in an XML document by printing each XML tag on a single line. |
void |
isolateTags(Reader reader,
Writer writer,
Map replacements)
"Isolates" XML tags and textual contents in an XML document by printing each XML tag on a single line. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String LINE_SEPARATOR_CLASS
public static final String SINGLE_LINE_WHITESPACE
Constructor Detail |
---|
public TagIsolator()
Method Detail |
---|
public final void isolateTags(Reader reader, Writer writer) throws IOException
reader
- the reader to read the original XML file fromwriter
- the writer to write the modified XML file to
IOException
- if an I/O error occurs while reading or writing
the datapublic final void isolateTags(Reader reader, Writer writer, Map replacements) throws IOException
reader
- the reader to read the original XML file fromwriter
- the writer to write the modified XML file toreplacements
- a map of additional replacements to perform within
the XML tags; maps regular expression Pattern
s
to replacement String
s; might be null
IOException
- if an I/O error occurs while reading or writing
the datapublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |