Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
Help with XPath Substring
VirtEyes
Posts: 62 ✭
in Virtualize
I am trying to get a part of a string up to the point where there is a blank space in the string. However, Virtualize is saying that it does not recognize what the .indexOf() function is.
Can someone guide me as to what could be the issue and how to get the sub-string properly in Virtualize?
The XPath code is am trying to use:
/:Envelope/:Body[1]/*:AddressIn[1]/@Address1In/substring(0,text().indexOf(' '))
I also need to get this substring:
substring(AddressIn.indexOf(' ')+1,AddressIn.length()
Tagged:
0
Comments
-
Hi,
I think the xpath function is named "index-of" see this link for examples, search for "index-of".https://www.w3schools.com/xml/xsl_functions.asp
Let us know if that helped!
1 -
This worked
0 -
Glad to hear that resolved the issue!
0