Does anyone know of an existing swift package for writing XML using a stream based API?
For example an API where I can call methods like startDocument, startElement, writeAttribute, endElement... as opposed to building up a DOM structure that is then serialized.
Here's an objective-c version of what I'm looking for:
Curious if there is a similar swift package around?
Thanks for response, I may. I was just checking to see if there was already a swift version out there that I couldn't find.
Generally I prefer swift version of things because:
API is likely designed to look nicer in swift
I'm building package and easiest to just include another Package based source.
There can be bridge performance issues (I don't know if this is really true anymore) but I've seen in past. For example I "think" my swift strings are in UTF8, going to Objective-c I think means they all need to be copied/encoded into UTF16. Probably not a big deal, maybe some magic avoids this, but I never really know what the bridge is doing.
Thanks for your help. I now realize I've been doing pretty dumb google searches when looking for swift libs... I see much better results just searching github with language:Swift. Thanks, that will help me out in the future.
i wonder what is your task at hand to write XML to a stream this "SAX" way. i remember forming XML manually, but that was to a string (not stream) and quite straightforward
You should also consider removing the keyword "stream" from the query to broaden your search. The results may still include libraries that stream but don't mention it in the documentation.