jquery/javascript Replacing and adding quotes to xml

Working  with the attached file, trying to make the xml have the following changes:
1.  "  change to ""
2.  beginning of each xml node has quote added to it
3.  ending of each closing xml node has " & _     added to it

I have #1 working.  
Help with #2 and #2 appreciated
Who is Participating?
cmalakarConnect With a Mentor Commented:
Test with this.

<!DOCTYPE html>
var x = '<abc><xyz></xyz></abc>';
x = x.replace(/(<[^/][^>]+>)/g, '"$1');
x = x.replace(/(<[/][^>]+>)/g, '$1"_');
The content of the body element is displayed in your browser.

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.