|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rendering.wikimodel.WikiPageUtil
public class WikiPageUtil
This class contains some utility methods used for escaping xml strings as well as for encoding/decoding http parameters.
| Constructor Summary | |
|---|---|
WikiPageUtil()
|
|
| Method Summary | |
|---|---|
static String |
decodeHttpParams(String str)
Returns the decoded http string - all special symbols, replaced by replaced by the %[HEX HEX] sequence, where [HEX HEX] is the hexadecimal code of the escaped symbol will be restored to its original characters (see RFC-2616 http://www.w3.org/Protocols/rfc2616/). |
static String |
encodeHttpParams(String str)
Returns the encoded string - all special symbols will be replaced by %[HEX HEX] sequence, where [HEX HEX] is the hexadecimal code of the escaped symbol (see RFC-2616 http://www.w3.org/Protocols/rfc2616/rfc2616.html). |
static String |
escapeXmlAttribute(String str)
Returns the escaped attribute string. |
static String |
escapeXmlString(String str)
Returns the escaped string. |
static String |
escapeXmlString(String str,
boolean escapeQuots)
Returns the escaped string. |
static String |
getCDATA(String text)
|
static boolean |
isValidXmlChar(int ch)
Returns true if the given value is a valid XML character. |
static boolean |
isValidXmlName(String tagName,
boolean colonEnabled)
This method checks the given string and returns true if it
is a valid XML name |
static boolean |
isValidXmlNameChar(char ch,
boolean colonEnabled)
Returns true if the given value is a valid XML name
character. |
static boolean |
isValidXmlNameStartChar(char ch,
boolean colonEnabled)
Returns true if the given value is a valid first character
of an XML name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WikiPageUtil()
| Method Detail |
|---|
public static String decodeHttpParams(String str)
str - the string to decode
public static String encodeHttpParams(String str)
str - the string to encode
public static String escapeXmlAttribute(String str)
str - the string to escape
public static String escapeXmlString(String str)
str - the string to escape
public static String escapeXmlString(String str,
boolean escapeQuots)
str - the string to escapeescapeQuots - if this flag is true then "'" and "\""
symbols also will be escaped
public static String getCDATA(String text)
public static boolean isValidXmlChar(int ch)
true if the given value is a valid XML character.
ch - the value to check
true if the given value is a valid XML character.http://www.w3.org/TR/xml/#charsets
public static boolean isValidXmlName(String tagName,
boolean colonEnabled)
true if it
is a valid XML name
tagName - the name to checkcolonEnabled - if this flag is true then this method
accepts the ':' symbol in the name
true if the given string is a valid XML namehttp://www.w3.org/TR/xml/#NT-Name
public static boolean isValidXmlNameChar(char ch,
boolean colonEnabled)
true if the given value is a valid XML name
character.
ch - the character to checkcolonEnabled - if this flag is true then this method
accepts the ':' symbol.
true if the given value is a valid XML name
characterhttp://www.w3.org/TR/xml/#NT-NameChar
public static boolean isValidXmlNameStartChar(char ch,
boolean colonEnabled)
true if the given value is a valid first character
of an XML name.
ch - the character to checkcolonEnabled - if this flag is true then this method
accepts the ':' symbol.
true if the given value is a valid first character
for an XML namehttp://www.w3.org/TR/xml/#NT-NameStartChar
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||