Class TagUtils
java.lang.Object
com.day.cq.wcm.designimporter.util.TagUtils
Utility class for html tag handling
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetClientLibIncludeTag(String clientLibCategory) static StringgetMatchingEndTag(String startTag) Returns the end tag for a start tag.static StringgetStartTag(String uri, String localName, String qName, Attributes atts) Formulates a stringified version of a start tag from the passed tag parameters.
-
Constructor Details
-
TagUtils
public TagUtils()
-
-
Method Details
-
getStartTag
Formulates a stringified version of a start tag from the passed tag parameters. Useful for converting tag params, passed over by a SAX parser, to string.- Parameters:
uri-localName-qName-atts-- Returns:
-
getMatchingEndTag
Returns the end tag for a start tag. Usually, the end tag name is derived by inserting a / appropriately e.g. the end tag for <div> is </div>The "empty" tags like <br> return an empty string
- Parameters:
startTag- The name of the start tag the end tag for which is needed- Returns:
- The end tag corresponding to the start tag passed or empty string if an empty html tag like <br> is passed
-
getClientLibIncludeTag
-