If you talked about XML, then its well formed and valid, You can try whether this code works or not by throwing an object of Error. But as per JavaDocs are concerned, Error are not meant to handle by application, its a case of abnormal condition and thus not handled.
Shiaber Shaam wrote:But i read somwhere that Error is not a valid entry. Please confirm.
I never tried this thing, but as I said, the XML is valid, If this code works by throwing the "Error" object, then its valid (but not recommended). So what exactly you mean, when you said a "valid entry" ?