How to update large XML file

前端 未结 5 1365
难免孤独
难免孤独 2020-12-17 02:00

Rather than rewriting the entire contents of an xml file when a single element is updated, is there a better alternative to updating the file?

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-17 02:55

    If possible, serialize the XML and use diff/patch/apply Linux tools (or equivalent tools in your platform) . This way, you don't have to deal with parsing, writing.

提交回复
热议问题