org.backsource.utils.javadoc
Class XMLEscaper

java.lang.Object
  extended byorg.backsource.utils.javadoc.XMLEscaper

public class XMLEscaper
extends java.lang.Object

Simple utility to help escape XML fragments one wants to put into javadoc comments.

When run as main may be given either a string argument consisting of the xml to escape, or with - wich will make it read in the data from stdin, to finish press ctr-d.

The outputed data will be placed in <pre></pre> tags.

Version:
$Revision: 1.1.1.1 $
Author:
Peter Antman

Constructor Summary
XMLEscaper()
           
 
Method Summary
static java.lang.String escape(java.lang.String xml)
          Escape xml string so its possible to use as element content, and in a javadoc comment.
static void main(java.lang.String[] args)
           Escape XML fragments one wants to put into javadoc comments.
static java.lang.String readInput()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLEscaper

public XMLEscaper()
Method Detail

escape

public static java.lang.String escape(java.lang.String xml)
                               throws java.lang.Exception
Escape xml string so its possible to use as element content, and in a javadoc comment. The returned XML will be placed inside <pre></pre> element.

Throws:
java.lang.Exception

readInput

public static java.lang.String readInput()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)

Escape XML fragments one wants to put into javadoc comments.

may be given either a string argument consisting of the xml to escape, or with - wich will make it read in the data from stdin, to finish press ctr-d.

The outputed data will be placed in <pre></pre> tags.



Copyright © 2000-2004 Backsource. All Rights Reserved.