title: How to read XML file in JMeter?
body: <p>I have tried:</p>
  
  <p><code>//${__FileToString(C:\\QC\\qa\\Testlink\\Jmeter\\Expected\\test.xml,ASCII,${xmlFile})};</code></p>
  
  <p>Found error message :
  <em><code>org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval  In file: inline evaluation of: ``//&lt;?xml version="1.0" encoding="UTF-8"?&gt;  &lt;feed xmlns="http://www.w3.org/2005/At . . . '' Encountered "&lt;" at line 2, column 1.</code></em></p>
  
  <p>also, I tried with <code>${__StringFromFile}</code> and got the same error message and even with beanshell script that is:</p>
  
  <pre><code>import org.apache.jmeter.services.FileServer;
  
    //Open the file  
    FileInputStream fstream = new FileInputStream("C://QC//qa//Testlink//Jmeter//Expected//test.xml");  
    //Get the object of DataInputStream  
    DataInputStream instream = new DataInputStream(fstream);  
    BufferedReader br = new BufferedReader(new InputStreamReader(instream));
  </code></pre>