On Dec 31, 2007 10:09 AM, Dani Castaños <danitao.mailists@xxxxxxxxx> wrote: > Thanks! Problem fixed... But I think PHP must do the cast automatically. > I think it's a bug fixed in a further version than mine as I've read > no problem; but just fyi, its not a bug; the behavior is as expected per the manual: http://us3.php.net/manual/en/ref.simplexml.php *Example#6 Comparing Elements and Attributes with Text* To compare an element or attribute with a string or pass it into a function that requires a string, you must cast it to a string using *(string)*. Otherwise, PHP treats the element as an object. if you use an operation that casts implicitly, such as echo, you dont have to cast yourself; otherwise you do :) -nathan