He's referring to the value testing portion of your example code, where you are testing with
if hello = ""
he is implying that e.GetBody() may be returning the invalid object, and not a string at all. In which case you would wan to test for that. From a language standpoint, invalid is not equivalent to the empy string (""), so you need to test for it explicitly if it is possible it might be returned instead.
P.S.
It's generally possible to intuit what type of errors you might get from a sample piece of code if given enough information, but if you are getting error, include what they are. Anything that reduces the amount of work required for someone to help will increase the chance of getting a prompt, correct answer, and not a request for more information or an incorrect assumption about what the problem is. A bit of sample code with lots of print statements printing the state of a current variable (in this case the hello and e variables) before and after any point that might cause the problem, and including the debug output, will make helping much easier. For example, I would have rewritten (and run) the sample code you included as the following (assuming everything but "next" was code):
print "e is ";type(e)
print "e.GetName() is ";e.GetName()
if e.GetName() = "hello" then
hello = e.GetBody()
end if
print "hello is ";hello
if hello = "" then
hello = "hello"
end if
print "hello is now ";hello
to which the console output might be (assuming it actually is getting invalid, I don't know)
e is roXMLElement
e.GetName() is hello
hello is invalid
hello is now invalid
At which point the problem would be somewhat obvious, if this is the actual output.
Of course, you don't have to be quite that pedantic when posting here, but in adding statements like that (which you would want to remove after identifying and fixing the problem, console prints have a specific performance penalty in my experience) you help illuminate why the code isn't functioning as you expect, in many cases allowing you to figure out and fix the problem without even having to ask how.
The print statement is your friend.
-- GandK Labs
Check out Reversi! in the channel store!