Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::util::XmlNormalizer Class Reference

List of all members.

Static Public Member Functions

String normalize (String s)
String normalizeXMLEmbeddedTextOnly (String xmlString)
String translate (char ch)

Static Private Member Functions

String normalize (String s, boolean normalizeXMLEmbeddedTextOnly)

Detailed Description

Normalizes XML data by escaping special characters such as '&' or ' <'.

Author:
hsommer created Jul 25, 2003 10:14:34 AM


Member Function Documentation

String alma::acs::util::XmlNormalizer::normalize String  s  )  [inline, static]
 

Normalizes a string to not conflict with XML markup characters. Only allocates memory if the string s does contain such markup. Otherwise s is returned.

String alma::acs::util::XmlNormalizer::normalize String  s,
boolean  normalizeXMLEmbeddedTextOnly
[inline, static, private]
 

Normalizes a string to not conflict with XML markup characters. Only allocates memory if the string s does contain such markup. Otherwise s is returned.

String alma::acs::util::XmlNormalizer::normalizeXMLEmbeddedTextOnly String  xmlString  )  [inline, static]
 

Normalizes any text in between quotes ("text") or text given as character data of mixed-content elements, all inside xmlString. Other text is left untouched. This method can be used to fix illegal text in an unparsable XML document, without destroying the XML markup itself.

Note that some rather simple parsing is used, and that there may be cases in which the result is undesirable. Thus this method should only be used as a fallback solution when the XML string can not be parsed with a regular XML parser.

Parameters:
xmlString 
Returns:

String alma::acs::util::XmlNormalizer::translate char  ch  )  [inline, static]
 

Translates the given character ch to its masked XML representation if this character is one of { <, >, &, ", ' }. Otherwise returns null.

Parameters:
ch 
Returns:
The corresponding XML representation such as "&amp;lt;" for a '<'.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:54:36 2009 for ACS Java API by doxygen 1.3.8