jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1832788 - /jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
Date Sun, 03 Jun 2018 20:23:27 GMT
Author: pmouawad
Date: Sun Jun  3 20:23:27 2018
New Revision: 1832788

URL: http://svn.apache.org/viewvc?rev=1832788&view=rev
Log:
Bug 60991 - XPath Extractor : Implement XPath 2.0

Use SaxSource
Bugzilla Id: 60991

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java?rev=1832788&r1=1832787&r2=1832788&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java Sun Jun  3 20:23:27 2018
@@ -45,7 +45,6 @@ import javax.xml.transform.TransformerFa
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.sax.SAXSource;
 import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.ImmutablePair;
@@ -441,7 +440,7 @@ public class XPathUtil {
             // However, in the current implementation sharing a DocumentBuilder (once initialized)

             // will only cause problems if a SchemaValidator is used.
             net.sf.saxon.s9api.DocumentBuilder builder = PROCESSOR.newDocumentBuilder();
-            XdmNode xdmNode = builder.build(new StreamSource(reader));
+            XdmNode xdmNode = builder.build(new SAXSource(new InputSource(reader)));
             
             if(xPathExecutable!=null) {
                 XPathSelector selector = null;



Mime
View raw message