4 ms·
Unfortunately I have vivid memories of one API I worked with (many years ago) that included entire encoded XML documents as attribute values within top level XM
by arethuza 7y ago
Unfortunately I have vivid memories of one API I worked with (many years ago) that included entire encoded XML documents as attribute values within top level XML. At least there was only one level of recursion.
Still, perhaps not as bad as using XML documents as database keys...
- tasogare 7y agoI saw that in HTML. Not from a professional developer but it still blow my mind. That was the final straw that made me quit the project.
- jefftk 7y agoI've needed to do that for HTML. If you need to put part of a document inside an iFrame (perhaps because you don't trust it) you have your backend generate <iframe sandbox srcdoc="..."> and nest it.
- perl4ever 7y agoA common misconception is that you can put anything in xml via CDATA so long as it doesn't have the ending delimiter embedded. https://stackoverflow.com/questions/21087648/xml-invalid-characters-when-creating-cdata-node-from-unicodestring https://stackoverflow.com/questions/21087648/xml-invalid-cha... I know about this because I received a file with illegal CDATA characters once.
- arethuza 7y agoReceiving XML that is almost valid can be a real pain - it certainly used to be that some XML parsers didn't report some weird errors in a particularly helpful way requiring manual scrutiny. I have unpleasant memories of trying to work out why some SOAP web service was breaking and it turned out the WSDL was invalid in a subtle way.