Form Editor - XPath Addressing, Absolute versus Relative
    • 17 Jun 2024
    • 1 Minute to read
    • Contributors
    • PDF

    Form Editor - XPath Addressing, Absolute versus Relative

    • PDF

    Article summary

    XPath can use either absolute addressing, through a single forward slash /, or relative addressing, through two forward slashes //.

    A single forward slash / selects from the root node. It quickly identifies the addressed element.

    Two forward slashes // selects nodes in the document from the current node, which match the selection no matter where they are. This is slower compared to absolute as it will take longer to identify the element, since the user specifies the partial path (not the exact path).

    Using // (relative addressing) means that Lasernet has to run through the entire datafile (or place in file) to search for all the elements with that name. The parsing of this takes time.

    Therefore, extensive use of // to address Patterns and Rearranges will have an impact on performance.

    For this reason, we recommend being careful when using relative addressing.

    Example of Pattern addressed Absolute:

    The same Pattern addressed Relative:


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.