I fail to see how your code snippet is mysql- or XML-related
what you do is escaping some characters with HTML codes in a manner that hardly could be improved upon - but then again, this shouldn't be neccesary - the bottleneck is usually in parsing (large) XML files, not in generating it
well every char that is outside that range will make the xml file unreadable for a browser .. so all them browsers are wrong? on the otherhand i know youre right cause .. xml is more then just html its a form of db.. and it shouldn't matter what chars i use.. and they sure as hell shouldn't be html like.. if i understood right.. what xml represents..