|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoapical.util.PrettyXML
Prints XML as in some HTML form, for example, with syntactic highlighting and indentation. This printing is controlled by an XSLT sytlesheet. If the XML is not well-formed, or the stylesheet is missing/broken, it is printed in raw form with an error message. Note: for this to work, you have to set the system property
Constructor Summary | |
PrettyXML()
|
Method Summary | |
static java.lang.String |
formatError(java.lang.String error)
|
static java.lang.String |
getFancyCSS()
Returns the contents of CSS stylesheet, which will be useful for the output of writeFancily . |
static java.lang.String |
toSimpleHTML(java.lang.String string)
Returns the XML string as HTML, with all the brackets quoted and the newlines treated as breaks. |
static void |
writeBoringly(java.io.Reader reader,
java.io.Writer writer)
Writes the XML from the reader parameter to
the writer as plain HTML (with the brackets
converted. |
static void |
writeFancily(java.io.Reader reader,
java.io.Writer writer)
Writes the XML from the reader parameter to
the writer via an XSLT sytlesheet. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PrettyXML()
Method Detail |
public static void writeFancily(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
reader
parameter to
the writer
via an XSLT sytlesheet.
java.io.IOException
getFancyCSS()
public static void writeBoringly(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
reader
parameter to
the writer
as plain HTML (with the brackets
converted.
java.io.IOException
public static java.lang.String getFancyCSS()
writeFancily
. The idea is that
you would call this once, before calling writeFancily
as many times as you like. It's up to you to decide whether
to put this in a style
block or a as a
link
writeFancily(java.io.Reader, java.io.Writer)
public static java.lang.String formatError(java.lang.String error)
public static java.lang.String toSimpleHTML(java.lang.String string)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |