Live data from Hacker News

How to Avoid Being Called a Bozo When Producing XML (2005)

hsivonen.fi

1–10 of 255 posts

Re: How to Avoid Being Called a Bozo When Producing XML (2005)

#7
post #3

Back in the early days of XML, Internet Explorer would insert "+" characters to fold nested sections of XML. And was the default program to open .xml files. Guess what showed up in the documents I got from an integration partner?

I think if you select/copied what was displayed you'd get the plus and minus signs. If you saved that wouldn't happen.

Re: How to Avoid Being Called a Bozo When Producing XML (2005)

#8
Some of this (avoiding pretty printing, mainly) is just dealing with XML's insanity. The rest is pretty solid advice, but fairly obvious for the most part. Then again, I've already done a lot of Scheme programming, understand common sense, and I read Steve Yegge's The Emacs Problem, So I already looked at XML as a tree structure, and crawling a pre-existing tree to turn it into XML is just the most natural way to deal with XML in Lisps.

Re: How to Avoid Being Called a Bozo When Producing XML (2005)

#10

Why would anyone choose to use XML over JSON, other than for RSS?

I can parse/print XML (using either in memory parser or streaming parser), use XML Schema to validate XML, XPath expressions to select necessary parts, automatic object mapping, and that's all with standard library without a single external dependency in Java. I don't know why would I use JSON over XML, unless I have very good reasons to do so.

For me the only thing that JSON got better is that JSON is directly mapped to commonly used data structures: arrays and maps.

Post reply on HN