Bug 61260 - __XPath function returns null despite xpath checker founds matches
Summary: __XPath function returns null despite xpath checker founds matches
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.6
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
: 61261 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-07 07:07 UTC by Alex
Modified: 2017-07-16 18:10 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2017-07-07 07:07:39 UTC
Step to reproduce:

1)note.xml content:

<?xml version="1.0" encoding="UTF-8"?>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>

2)XPath function expression:

${__XPath(d:\\test\\note.xml,note/body)}
${__XPath(d:\test\note.xml,note/body)}
${__XPath(d:/test/note.xml,note/body)}
All of  the variants don't work

Actual result:
Function returns: null

Expected result:
Function returns: Don't forget me this weekend!
Comment 1 Alex 2017-07-07 08:01:03 UTC
*** Bug 61261 has been marked as a duplicate of this bug. ***
Comment 2 Philippe Mouawad 2017-07-16 18:10:19 UTC
Author: pmouawad
Date: Sun Jul 16 18:08:47 2017
New Revision: 1802078

URL: http://svn.apache.org/viewvc?rev=1802078&view=rev
Log:
Bug 61260 - __XPath function returns null despite xpath checker founds matches
Bugzilla Id: 61260

Added:
    jmeter/trunk/bin/testfiles/XPathTest2.xml   (with props)
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
    jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathFileContainer.java
    jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java
    jmeter/trunk/xdocs/changes.xml


Author: pmouawad
Date: Sun Jul 16 18:09:46 2017
New Revision: 1802079

URL: http://svn.apache.org/viewvc?rev=1802079&view=rev
Log:
Bug 61260 - __XPath function returns null despite xpath checker founds matches
svn properties
Bugzilla Id: 61260

Modified:
    jmeter/trunk/bin/testfiles/XPathTest2.xml   (props changed)
Comment 3 The ASF infrastructure team 2022-09-24 20:38:09 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4421