title: Displaying a hyphen"-" from a xml to Corona?
body: <p>I have a xml file that has a hyphen"-" inside, how can I display the hyphen into the 
  Corona apps?</p>
  
  <p>Part of the xml file:</p>
  
  <pre><code>&lt;data&gt;Value : 54-57&lt;/data&gt;
  </code></pre>
  
  <p>For now I can only display 5457 which became totally wrong.</p>
  
  <p>Parts of the code for xmlparse:</p>
  
  <pre><code>print("found item")
  if founditem == true then
      for i=1,#Item do 
          for j=1,#Item[i].child do
              if Item[i].child[j].name == "data" then
                  DataReading[i] = simplifyData(Item[i].child[j].value)
              end
          end
      end 
  end
  </code></pre>
  
  <p>Parts for the "SimplifyData" code:</p>
  
  <pre><code>function simplifyData(data)
  data = string.gsub(data,"%a", "")
  data = string.gsub(data,"%s","")
  data = string.gsub(data,":","")
  data = string.gsub(data,"-","")
  
  data = tonumber(data)
  return data 
  end
  </code></pre>
  
  <p>Any ideas how can I make the hyphen display?
  Thanks</p>
  
  <p><strong>If I remove that line of code I would get an error</strong>:</p>
  
  <blockquote>
    <p>attempt to compare nil with number</p>
  </blockquote>
  
  <p>The error occurs in this part of the code :</p>
  
  <pre><code>function Datarating()
  if DataReading[1] &lt;= 50 then
      Results = "Pass"
  elseif DataReading[1] &lt;= 100 and DataReading[1] &gt; 50 then
      Results = "Well Done"
  elseif DataReading[1] &lt;= 150 and DataReading[1] &gt; 100 then
      Results = "Excellent"
            ...
            ...
            ...
  else 
      Results = "Not Defined"
  end
  end
  </code></pre>
  
  <p>The line of errors is at :<code>if DataReading[1] &lt;= 50 then</code></p>
  
  <p>Is there something wrong with the way I wrote my Datarating function? </p>
  
  <hr>
  
  <pre><code>function writeCurrentDataToLastUpdatedFile()
   print("writing current data to file")
   local path = system.pathForFile("filesupdate_data.txt",system.DocumentsDirectory)
   local file = io.open (path, "w")
   local currentDATA = DataReading[1]
   local printDataString = currentDATA
   file:write(printDataString) 
   print(printDataString)
   print("data written")
   io.close (file)
  end
  </code></pre>