org.apache.jmeter.protocol.http.correlation

## Class CreateXPath2Extractor

- java.lang.Object
- - org.apache.jmeter.protocol.http.correlation.CreateXPath2Extractor

- All Implemented Interfaces:
    CreateExtractorInterface

      public class CreateXPath2Extractor
      extends Object
      implements CreateExtractorInterface

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ExtractorData` | `createExtractor(ExtractorCreatorData extractorCreatorData)` Create XPath2 Extractor
    `TestElement` | `createExtractorTestElement(ExtractorData extractordata, TestElement testElement)` Create XPath2 extractor TestElement
    `static String` | `getXPath(String value, StringReader xml, InputStream xslt)` Get XPath query expression of the value in xml
    `static String` | `transform(StringReader xml, InputStream xslt)` Perform XSL transform

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createExtractor

          public ExtractorData createExtractor(ExtractorCreatorData extractorCreatorData)

      Create XPath2 Extractor
      Specified by:
        `createExtractor` in interface `CreateExtractorInterface`
      Parameters:
        `extractorCreatorData` - ExtractorCreatorData object.
      Returns:
        ExtractorData object

    - #### transform

          public static String transform(StringReader xml,
                                         InputStream xslt)
                                  throws TransformerException

      Perform XSL transform
      Parameters:
        `xml` - document
        `xslt` - is XSL transform which creates XPath for all XML nodes
      Returns:
        transformed XML
      Throws:
        `TransformerException` - when XSL transformation failed

    - #### getXPath

          public static String getXPath(String value,
                                        StringReader xml,
                                        InputStream xslt)
                                 throws TransformerException

      Get XPath query expression of the value in xml
      Parameters:
        `value` - of Attribute/Text content in XML to create XPath
        `xml` - document
        `xslt` - is XSL transform which creates XPath for all XML nodes
      Returns:
        XPath query expression or null if unable to find value in xml
      Throws:
        `TransformerException` - when XSL transformation failed

    - #### createExtractorTestElement

          public TestElement createExtractorTestElement(ExtractorData extractordata,
                                                        TestElement testElement)

      Create XPath2 extractor TestElement
      Specified by:
        `createExtractorTestElement` in interface `CreateExtractorInterface`
      Parameters:
        `extractordata` - ExtractorData object.
        `testElement` - TestElement object
      Returns:
        xPath2extractor TestElement

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.