How to add special characters like & > in XML file using JavaScript

DBJohnston0104

New Member
I am generating XML using Javascript. It works fine if there are no special characters in the XML. Otherwise, it will generate this message: "invalid xml".I tried to replace some special characters, like:\[code\]xmlData=http://stackoverflow.com/questions/8341885/xmlData.replaceAll(">",">");xmlData=http://stackoverflow.com/questions/8341885/xmlData.replaceAll("&","&");//but it doesn't work.\[/code\]For example:\[code\]<category label='ARR Builders & Developers'>\[/code\]Thanks.
 
Top