Package com.googlecode.jatl
Class MarkupUtils
java.lang.Object
com.googlecode.jatl.MarkupUtils
XML Utils.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
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 String
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.
-
Constructor Details
-
MarkupUtils
private MarkupUtils()
-
-
Method Details
-
escapeElementEntities
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
-String
input to escape.- Returns:
String
with escaped content.
-
escapeAttributeEntities
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
-String
input to escape.- Returns:
String
with escaped content.
-