Modfying an XML document using a streaming XML parser & formatter:
30 lines of code, 150ms.
A bunch of regexes:
6 lines, 5ms.
- does the document allow arbitrary nesting?
- is the document controllable by attacker?
No and no.
I know what I'm doing...
@ayo Almost any computing problem can be reduced to regex, given enough frustration. 😜
A lonely little town in the wider world of the fediverse.