com.google.checkout.util
Class EncodeHelper

java.lang.Object
  extended by com.google.checkout.util.EncodeHelper

public final class EncodeHelper
extends java.lang.Object

Helper class for escaping XML characters < > and &

Version:
1.0
Author:
ksim

Constructor Summary
EncodeHelper()
           
 
Method Summary
static java.lang.String EscapeXmlChars(java.lang.String str)
          Escapes XML characters < > and &.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncodeHelper

public EncodeHelper()
Method Detail

EscapeXmlChars

public static java.lang.String EscapeXmlChars(java.lang.String str)
Escapes XML characters < > and &.

Parameters:
str - String which could contain < > and & characters.
Returns:
A new string where & has been replaced by &#x26;, < has been replaced by &#x3c; and > has been replaced by &#x3e;. These replacements are mandated here in the Dev Guide: http://code.google.com/apis/checkout/developer/index.html#api_request_guidelines