What's so bad about building XML with string concatenation?

前端 未结 12 1384
长发绾君心
长发绾君心 2020-12-01 12:21

In the thread What’s your favorite “programmer ignorance” pet peeve?, the following answer appears, with a large amount of upvotes:

Programmers who build XML u

12条回答
  •  长情又很酷
    2020-12-01 13:09

    I think that the problem is that you aren't watching the xml file as a logical data storage thing, but as a simple textfile where you write strings.

    It's obvious that those libraries do string manipulation for you, but reading/writing xml should be something similar to saving datas into a database or something logically similar

提交回复
热议问题