I have the same problem with XML too. Notepad++ has a plugin that can format a 50MB XML file in a few seconds. But my current client won’t allow plugins installed. So I have to use VS Code, which chokes on anything bigger than what I could do myself manually if I was determined.

You don’t need to open a file in a text editor to format it

Meanwhile, I can open a 1GB file in (stock) vim without any trouble at all.

Formatting is what xmllint is for.

Johanno
link
fedilink
46M

Just install python and format it. Then

@seaQueue@lemmy.world
creator
link
fedilink
126M

Time to train an LLM to format XML and hope for the best

Do we need a “don’t parse xml with LLM” copypasta?

@QuazarOmega@lemy.lol
link
fedilink
English
146M
L arge  
L regex  
M odel

Wait, it’s all regex?

Always has been

I don’t wish death on anyone.

Caveman
link
fedilink
46M

I use vim macros. You can do some crazy formatting with it

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog