net.sf.eclipseexeditor.xml
Class XMLText

java.lang.Object
  extended bynet.sf.eclipseexeditor.xml.XMLText

public final class XMLText
extends Object

This class provides text operations for XML. This is not for XML parsing, but rather operating on XML as text.

Author:
David Biesack David.Biesack@mindspring.com

Method Summary
static String quoteXML(String xmlText)
          Quote special XML characters in the input xmlText.
static String unquoteXML(String quotedXML)
          Unquote XML special character entities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

unquoteXML

public static String unquoteXML(String quotedXML)
Unquote XML special character entities. This undoes the behavior which quoteXML(String) does. This method does not process &xhhh; or &nnn; special entities.

Parameters:
quotedXML - input XML text with quoted XML entities.
Returns:
The input quotedText, with XML special characters unquoted.

quoteXML

public static String quoteXML(String xmlText)
Quote special XML characters in the input xmlText. The '<' character is replaced with &lt;; '>' is replaced with &gt;; '&' replaced with &amp;, and '"' replaced with '&quot;'.

Parameters:
xmlText - A string containing XML. This does not have to be well formed; it can be a fragment of XML.
Returns:
The input xmlText, with XML special characters quoted.