Class TagUtils

java.lang.Object
com.day.cq.wcm.designimporter.util.TagUtils

public class TagUtils extends Object
Utility class for html tag handling
  • Constructor Details

    • TagUtils

      public TagUtils()
  • Method Details

    • getStartTag

      public static String getStartTag(String uri, String localName, String qName, 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 String getMatchingEndTag(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 String getClientLibIncludeTag(String clientLibCategory)