title: How can I parse a text file using javascript
body: <p>The code below is to read a text file using javascript. it works.
  However, I just want to read part of the content. 
  For example, the content of the file is :"Hello world!"
  I just want to display "Hello".
  I tried function <strong>split()</strong>, but it only works on strings. I don't know how to insert it here.</p>
  
  <pre><code> var urls = ["data.txt"];
  
  function loadUrl() {
      var urlToLoad = urls[0];
      alert("load URL ... " + urlToLoad);
      browser.setAttributeNS(xlinkNS, "href", urlToLoad);
  }
  </code></pre>
  
  <p>thank you!!!</p>