From: Stuart Clarke Date: 2011-02-07T04:37:18+09:00 Subject: REXML - Empty string error Hi all, I am parsing some XML with XPATH and REXML. A snippet is below: .. e.elements['Questions'].text << "," << e.elements['Offers'].text << "," << e.elements['ID'].text << "," << .. The ID XML tag is often an empty tag (no data in it) and this throws an error in my script of .rb:364:in `<<': can't convert nil into String (TypeError) How do I ignore this error? I just want to take whatever is in the XML (even if it is empty) and carry on to the next data set. Many thanks -- Posted via http://www.ruby-forum.com/.