xpath - Parsing a JMeter response (an XML-formatted .srx file) -
i'm using jmeter run test response returned xml-formatted .srx sparql file. error i'm getting is:
2015/04/28 1:30:39 error - jmeter.util.xpathutil: type=val=false tol=false org.xml.sax.saxparseexception; linenumber: 1; columnnumber: 1; content not allowed in prolog. 2015/04/28 11:30:39 warn - jmeter.extractor.xpathextractor: saxexception while processing (sparql/results/result/binding/literal) content not allowed in prolog. i'm pretty new jmeter. guess xpath extractor somehow doing magic in place i'm not expecting. xml file response looks (a snipplet file), without space before or characters:
<?xml version='1.0' encoding='utf-8'?> <sparql xmlns='http://www.w3.org/2005/sparql-results#'> <head> <variable name='p'/> </head> <results> <result> <binding name='p'> <literal datatype='http://www.w3.org/2001/xmlschema#date'>1999-08-16</literal> </binding> i set xpathextractor way:
reference name:results xpath query:sparql/results/result/binding/literal default value:not found can help?
i go following approach:
in user.properties file (located in /bin folder of jmeter installation) add next line:
xpath.namespace.config=my.propertiescreate my.properties file in /bin folder of jmeter installation , add following line there:
s=http://www.w3.org/2005/sparql-results#configure xpath extractor following way:
- check
use namespacesbox - reference name: variable name of choice, i.e.
literal - xpath query:
//s:literal/text()
- check
in regards question: content not allowed in prolog message stands not well-formed xml, suggestion applicable valid xml
references:
Comments
Post a Comment