Class HtmlParsingUtils

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static boolean isAnchorMatched(HTTPSamplerBase newLink, HTTPSamplerBase config) Check if anchor matches by checking against: - protocol - domain - path - parameter names
      static boolean isArgumentMatched(Argument arg, Argument patternArg) Arguments match if the input name matches the corresponding pattern name and the input value matches the pattern value, where the matching is done first using String equals, and then Regular Expression matching if the equals test fails.
      static boolean isEqualOrMatches(String arg, String pat, Perl5Matcher matcher, PatternCacheLRU cache) Match the input argument against the pattern using String.equals() or pattern matching if that fails.
      static boolean isEqualOrMatchesCaseBlind(String arg, String pat, Perl5Matcher matcher, PatternCacheLRU cache) Match the input argument against the pattern using String.equals() or pattern matching if that fails using case-insensitive matching.
      static boolean isEqualOrMatches(String arg, String pat) Match the input argument against the pattern using String.equals() or pattern matching if that fails using case-insensitive matching.
      static boolean isEqualOrMatchesCaseBlind(String arg, String pat) Match the input argument against the pattern using String.equals() or pattern matching if that fails using case-insensitive matching.
      static Tidy getParser() Returns tidy as HTML parser.
      static Node getDOM(String text) Returns a node representing a whole xml given an xml document.
      static Document createEmptyDoc()
      static HTTPSamplerBase createUrlFromAnchor(String parsedUrlString, URL context) Create a new Sampler based on an HREF string plus a contextual URL object.
      static List<HTTPSamplerBase> createURLFromForm(Node doc, URL context)
      static void extractStyleURLs(URL baseUrl, URLCollection urls, String styleTagStr)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • isAnchorMatched

         static boolean isAnchorMatched(HTTPSamplerBase newLink, HTTPSamplerBase config)

        Check if anchor matches by checking against: - protocol - domain - path - parameter names

        Parameters:
        newLink - target to match
        config - pattern to match against
      • isArgumentMatched

         static boolean isArgumentMatched(Argument arg, Argument patternArg)

        Arguments match if the input name matches the corresponding pattern name and the input value matches the pattern value, where the matching is done first using String equals, and then Regular Expression matching if the equals test fails.

        Parameters:
        arg - - input Argument
        patternArg - - pattern to match against
      • isEqualOrMatches

         static boolean isEqualOrMatches(String arg, String pat, Perl5Matcher matcher, PatternCacheLRU cache)

        Match the input argument against the pattern using String.equals() or pattern matching if that fails.

        Parameters:
        arg - input string
        pat - pattern string
        matcher - Perl5Matcher
        cache - PatternCache
      • isEqualOrMatchesCaseBlind

         static boolean isEqualOrMatchesCaseBlind(String arg, String pat, Perl5Matcher matcher, PatternCacheLRU cache)

        Match the input argument against the pattern using String.equals() or pattern matching if that fails using case-insensitive matching.

        Parameters:
        arg - input string
        pat - pattern string
        matcher - Perl5Matcher
        cache - PatternCache
      • isEqualOrMatches

         static boolean isEqualOrMatches(String arg, String pat)

        Match the input argument against the pattern using String.equals() or pattern matching if that fails using case-insensitive matching.

        Parameters:
        arg - input string
        pat - pattern string
      • isEqualOrMatchesCaseBlind

         static boolean isEqualOrMatchesCaseBlind(String arg, String pat)

        Match the input argument against the pattern using String.equals() or pattern matching if that fails using case-insensitive matching.

        Parameters:
        arg - input string
        pat - pattern string
      • getParser

         static Tidy getParser()

        Returns tidy as HTML parser.

      • getDOM

         static Node getDOM(String text)

        Returns a node representing a whole xml given an xml document.

        Parameters:
        text - an xml document
      • createUrlFromAnchor

         static HTTPSamplerBase createUrlFromAnchor(String parsedUrlString, URL context)

        Create a new Sampler based on an HREF string plus a contextual URL object. Given that an HREF string might be of three possible forms, some processing is required.

        Parameters:
        parsedUrlString - the url from the href
        context - the context in which the href was found.