net.netheos.pcsapi.utils
Class XmlUtils

java.lang.Object
  extended by net.netheos.pcsapi.utils.XmlUtils

public class XmlUtils
extends Object

Utils class for escaping xml strings


Constructor Summary
XmlUtils()
           
 
Method Summary
static String escape(String str)
           Escapes the characters in a String.
static Document getDomFromString(String str)
          Parses a string and build a DOM
 String unescape(String str)
           Unescapes the entities in a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlUtils

public XmlUtils()
Method Detail

escape

public static String escape(String str)

Escapes the characters in a String.

For example, if you have called addEntity("foo", 0xA1), escape("¡") will return "&foo;"

Parameters:
str - The String to escape.
Returns:
A new escaped String.

unescape

public String unescape(String str)

Unescapes the entities in a String.

For example, if you have called addEntity("foo", 0xA1), unescape("&foo;") will return "¡"

Parameters:
str - The String to escape.
Returns:
A new escaped String.

getDomFromString

public static Document getDomFromString(String str)
Parses a string and build a DOM

Returns:
DOM


Copyright © 2014. All Rights Reserved.