XMLdb: changed an error code outside the 6500 to 6506 range
XMLdb: added escape function
Added some test cases for XMLdb
Fixed: possible null deref in xmldb
XMLdb added more tests
Fixed: missing semicolon check in some functions and improved errors.