News for hackers. Stuff that matters.
Re:Parsing XML at the Speed of Light (2012) by jcon321 on Tuesday July 19, 2022 @08:43AM (#32150666)
I don't know, xml represents multiline values so much better than json/yaml. Then when it comes to escaping reserved characters, wrapping it in cdata is a lot cleaner than json/yaml escaping.

I am currently building something new that uses xml for a properties file. My use case requires sql inside a properties file (without the use of additional .sql files). Really wanted to use json/yaml because I felt like I was in the 90s, but xml was just a lot better for this case.

Re:Parsing XML at the Speed of Light (2012) by pydry on Tuesday July 19, 2022 @09:00AM (#32150838)

  This: |
    Always "seemed" a lot cleaner to me.
I dont see why it doesnt accomodate SQL just fine.

JSON was never intended primarily for user readability. It's for sending data over a wire. Its focus was on parsing simplicity, ease of serialization and deserialization and to be incidentally readable.

Re:Parsing XML at the Speed of Light (2012) by guiriduro on Tuesday July 19, 2022 @11:09AM (#32152584)
Only works well if your text is a leaf and has no other contained entities/structure.

<entity attr="whatever">Try to make this <appearance>look good</appearance> in <markup>YAML</markup></entity>

As I said, horses for courses. FWIW I actually like YAML for certain limited use cases, just not where XML is better. And vice versa.

Re:Parsing XML at the Speed of Light (2012) by pydry on Tuesday July 19, 2022 @12:37PM (#32154255)

  entity:
    attr: whatever
    text: |-
      Try to make this *look good* in **YAML**.
^ I have quite a lot of YAML hanging around these days like this.

Markdown is surprisingly effective as an XML document markup replacement.