com.g11ntoolkit.parser.xml
Class LTXMLString

java.lang.Object
  |
  +--com.g11ntoolkit.parser.xml.LTXMLString

public class LTXMLString
extends java.lang.Object

Handles a string in an XML file.

Normalizes and denormalizes reserved characters so there is no confusion about their use in a string.

Version:
2005/06/20
Author:
Bill Rich, Wilandra Consulting LLC
Copyright © 2002-2005, Wilandra Consulting LLC. All rights reserved.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See License Agreement.


Field Summary
private static java.util.logging.Logger log
          The log used for all messages from this class.
private static java.util.ResourceBundle mrb
          Message Resource Bundle.
private static java.util.ResourceBundle vrb
          Variables Resource Bundle.
 
Constructor Summary
LTXMLString()
          Constructs an instance of the object.
 
Method Summary
 java.lang.String denormalize(java.lang.String s)
          Denormalizes the special characters in the specified string and returns the result.
 java.lang.String exposeXML(java.lang.String s)
          Exposes the special XML characters in the specified string and returns the result.
 java.lang.String hideXML(java.lang.String s)
          Hides the special XML characters &, <, and > in the specified string and returns the result.
 java.lang.String normalize(java.lang.String s)
          Normalizes the special characters in the specified string and returns the result.
 java.lang.String normalize2(java.lang.String s)
          Normalizes the special characters (except ") in the specified string and returns the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log
The log used for all messages from this class.


mrb

private static java.util.ResourceBundle mrb
Message Resource Bundle.


vrb

private static java.util.ResourceBundle vrb
Variables Resource Bundle.

Constructor Detail

LTXMLString

public LTXMLString()
Constructs an instance of the object.

Method Detail

normalize

public java.lang.String normalize(java.lang.String s)
Normalizes the special characters in the specified string and returns the result.

Parameters:
s - a String specifying the string that may contain the special characters
Returns:
a String representing the specified string with any special characters converted to their corresponding XML elements

normalize2

public java.lang.String normalize2(java.lang.String s)
Normalizes the special characters (except ") in the specified string and returns the result.

Parameters:
s - a String specifying the string that may contain the special characters
Returns:
a String representing the specified string with any special characters (except ") converted to their corresponding XML elements

denormalize

public java.lang.String denormalize(java.lang.String s)
Denormalizes the special characters in the specified string and returns the result.

Parameters:
s - a String specifying the string that may contain the normalized special characters
Returns:
a String representing the specified string with any normalized special characters converted to their raw form

hideXML

public java.lang.String hideXML(java.lang.String s)
Hides the special XML characters &, <, and > in the specified string and returns the result.

Parameters:
s - a String specifying the string that may contain the special XML characters
Returns:
a String representing the specified string with any special XML characters converted to their corresponding XML elements

exposeXML

public java.lang.String exposeXML(java.lang.String s)
Exposes the special XML characters in the specified string and returns the result.

Parameters:
s - a String specifying the string that may contain the hidden special XML characters
Returns:
a String representing the specified string with any special XML characters converted to their raw form