how to parse xml with special character? specifically for ampersand
问题 I am getting data from text box and change it into xml format and store it in data base. For allowing special characters i wrote javascript function to replace special character with its html entities. " " & & < < > > for "quotes , less than , greater than" its working fine. for "&" it is showing xml parser error i used javascript to replace special character with its entity string.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "\\'"); for "&" allow