Live data from Hacker News

Why XML tags are so fundamental to Claude

glthr.com

81–90 of 160 posts

Re: Why XML tags are so fundamental to Claude

#81
post #3

Anthropic’s tool calling was exposed as XML tags at the beginning, before they introduced the JSON API. I expect they’re still templating those tool calls into XML before passing to the model’s context

Can you sniff it out with Wireshark?

They don't expose the raw context over the wire, it's all pre/post processed at their API endpoints.

Re: Why XML tags are so fundamental to Claude

#82
post #77
post #44

Earlier quoted context omitted.

XML has been "spooky old technology" for over a decade now. It's heyday was something like 2002. Nobody dares advertise the XML capabilities of their product (which back then everybody did), nobody considers it either hot new thing (like back then) or mature - just obsolete enterprise shit. It's about as popular now as J2EE, except to people that think "10 years ago" means 1999.

I kind of miss SOAP. Ahead of its time? Probably not, but I built some cool things on top of it

atproto's lexicon-based rpc is pretty soap-like

Re: Why XML tags are so fundamental to Claude

#83
post #63

> a contrast between Claude’s modern approach [...] XML, a technology dating back to 1998 Are we really at the point where some people see XML as a spooky old technology? The phrasing dotted around this article makes me feel that way. I find this quite strange.

XML is still around, but I don't think many people would choose it as a serialization format today for something new.

The use of XML as a data serialization format was always a bad choice. It was designed as a document _markup_ language (it’s in the name), which is exactly the way it’s being used for Claude, and is actually a good use case.

Re: Why XML tags are so fundamental to Claude

#84
post #44

> a contrast between Claude’s modern approach [...] XML, a technology dating back to 1998 Are we really at the point where some people see XML as a spooky old technology? The phrasing dotted around this article makes me feel that way. I find this quite strange.

XML has been "spooky old technology" for over a decade now. It's heyday was something like 2002. Nobody dares advertise the XML capabilities of their product (which back then everybody did), nobody considers it either hot new thing (like back then) or mature - just obsolete enterprise shit. It's about as popular now as J2EE, except to people that think "10 years ago" means 1999.

It's not the hot new thing but when has hype ever mattered for getting shit done? I don't think anyone who considers it obsolete has an informed opinion on the matter.

Typically a more primitive (sorry, minimal) format such as JSON is sufficient in which case there's no excuse to overcomplicate things. But sometimes JSON isn't sufficient and people start inventing half baked solutions such as JSON-LD for what is already a solved problem with a mature tech stack.

XSLT remains an elegant and underused solution. Guile even includes built in XML facilities named SXML.

Re: Why XML tags are so fundamental to Claude

#85

> a contrast between Claude’s modern approach [...] XML, a technology dating back to 1998 Are we really at the point where some people see XML as a spooky old technology? The phrasing dotted around this article makes me feel that way. I find this quite strange.

It has a number of security issues which have not been fixed which could be used for really interesting exploitation.

Re: Why XML tags are so fundamental to Claude

#86

Earlier quoted context omitted.

XML is much more readable than JSON, especially if your data has characters that are meaningful JSON syntax

I think readability is in the eye of the reader. JSON is less verbose, no ending tags everywhere, which I think makes it more readable than XML. But I'd be happy to hear about studies that show evidence for XML being more readable, than JSON.

I disagree that XML is more readable in general, but for the purpose of tagging blocks of text as important in freeform writing, JSON is basically useless

Re: Why XML tags are so fundamental to Claude

#87
post #71
post #44

Earlier quoted context omitted.

XML has been "spooky old technology" for over a decade now. It's heyday was something like 2002. Nobody dares advertise the XML capabilities of their product (which back then everybody did), nobody considers it either hot new thing (like back then) or mature - just obsolete enterprise shit. It's about as popular now as J2EE, except to people that think "10 years ago" means 1999.

XML is used a lot in standards and publishing industries -- JATS, EPUB, ODF, DOCX/XLSX/..., DocBook, etc. are all XML based/use XML.

Also in finance. XBRL and FIXML although I do not know how widely used the latter is.

Re: Why XML tags are so fundamental to Claude

#89
It'd be hilarious if XML schemas and validators were to make a comeback [1] to... interface with AI models.

[1] well of course XML is still heavily used in stuff like interfacing with automated wire transfers with big banks (at least in Europe) and all the digital payments directives etc. But XML is not widely used by the "cool" stuff.

Re: Why XML tags are so fundamental to Claude

#90

> a contrast between Claude’s modern approach [...] XML, a technology dating back to 1998 Are we really at the point where some people see XML as a spooky old technology? The phrasing dotted around this article makes me feel that way. I find this quite strange.

XML is back, everyone is rediscovering the terminal. Soon we’ll discover that object oriented programming is good again.
Post reply on HN