Package com.googlecode.jatl
Class MarkupUtils
- java.lang.Object
-
- com.googlecode.jatl.MarkupUtils
-
public final class MarkupUtils extends java.lang.ObjectXML Utils.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateMarkupUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringescapeAttributeEntities(java.lang.String str)This will take the pre-defined entities in XML 1.0 and convert their character representation to the appropriate entity reference, suitable for XML attributes.static java.lang.StringescapeElementEntities(java.lang.String str)This will take the three pre-defined entities in XML 1.0 (used specifically in XML elements) and convert their character representation to the appropriate entity reference, suitable for XML element content.
-
-
-
Method Detail
-
escapeElementEntities
public static java.lang.String escapeElementEntities(java.lang.String str)
This will take the three pre-defined entities in XML 1.0 (used specifically in XML elements) and convert their character representation to the appropriate entity reference, suitable for XML element content.- Parameters:
str-Stringinput to escape.- Returns:
Stringwith escaped content.
-
escapeAttributeEntities
public static java.lang.String escapeAttributeEntities(java.lang.String str)
This will take the pre-defined entities in XML 1.0 and convert their character representation to the appropriate entity reference, suitable for XML attributes. It does not convert the single quote (') because it's not necessary as the outputter writes attributes surrounded by double-quotes.- Parameters:
str-Stringinput to escape.- Returns:
Stringwith escaped content.
-
-