1

I want to edit an xml data using node.js and angular.js. After converting xml to json, i want to do some changes and save it back to xml file. It needs to preserve the order of child elements and handle special characters like " etc

JLRishe
  • 99,490
  • 19
  • 131
  • 169
usersam
  • 1,125
  • 4
  • 27
  • 54

1 Answers1

0

You could use the xml-js package.

Bachman
  • 701
  • 1
  • 6
  • 25
  • I tried but it changes orders of child elements and does not handle special characters like &quote; etc – usersam Nov 01 '17 at 16:26
  • Shouldn't that then be part of your question? – James Z Nov 01 '17 at 16:39
  • OK, that hasn't been an issue for me. I suggest adding the requirements to the original question. You can also take a look at this thread: https://stackoverflow.com/q/1773550/8824227 – Bachman Nov 01 '17 at 16:42
  • In general, when asking questions on SO you should explain the steps you took to solve the problem and why they didn't work. That helps us a lot to answer your question. – aaaaaa Nov 01 '17 at 16:42
  • 1
    So how did you invoke it? xml-js has two modes, compact and non-compact: which did you use? – Michael Kay Nov 01 '17 at 17:44