Class TagUtils
- java.lang.Object
-
- com.day.cq.wcm.designimporter.util.TagUtils
-
public class TagUtils extends java.lang.Object
Utility class for html tag handling
-
-
Constructor Summary
Constructors Constructor Description TagUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getClientLibIncludeTag(java.lang.String clientLibCategory)
static java.lang.String
getMatchingEndTag(java.lang.String startTag)
Returns the end tag for a start tag.static java.lang.String
getStartTag(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
Formulates a stringified version of a start tag from the passed tag parameters.
-
-
-
Method Detail
-
getStartTag
public static java.lang.String getStartTag(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
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
public static java.lang.String getMatchingEndTag(java.lang.String startTag)
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
public static java.lang.String getClientLibIncludeTag(java.lang.String clientLibCategory)
-
-