Class XMLTools

java.lang.Object
com.softsynth.util.XMLTools

public class XMLTools
extends java.lang.Object
Tools for reading and writing XML files.
Author:
(C) 1997 Phil Burk, All Rights Reserved
See Also:
XMLListener, XMLPrinter
  • Constructor Summary

    Constructors
    Constructor Description
    XMLTools()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String escapeText​(java.lang.String text)
    Convert a human readable string into an XML valid string with proper escape sequences.
    static void main​(java.lang.String[] argv)  
    static java.lang.String replaceCharacters​(java.lang.String text, int ch, java.lang.String newText)  
    static void testText​(java.lang.String text1)  
    static java.lang.String unescapeText​(java.lang.String text)  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XMLTools

      public XMLTools()
  • Method Details

    • replaceCharacters

      public static java.lang.String replaceCharacters​(java.lang.String text, int ch, java.lang.String newText)
    • escapeText

      public static java.lang.String escapeText​(java.lang.String text)
      Convert a human readable string into an XML valid string with proper escape sequences. Character like '<' must be converted to <
              &  => &
              < => <
              > => >
              " => "
              ' => '
       
    • unescapeText

      public static java.lang.String unescapeText​(java.lang.String text)
    • testText

      public static void testText​(java.lang.String text1)
    • main

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