xml - Implementing a custom Decoder in Swift 4 -


i'd decode xml document using new decodable protocol introduced in swift 4, however, there doesn't seem existing implementation xml decoder conforms decoder protocol.

my plan use swxmlhash library parse xml, possibly make xmlindexer class in library extend decoder protocol model can initialized instance of xmlindexer (xmlindexer returned swxmlhash.parse(xmlstring)).

xmlindexer+decoder.swift

my issue have no clue how implement decoder protocol , can't seem find resources online explain how it's done. every resource i've found strictly mentions jsondecoder class included swift standard library , no resource i've found addresses issue of creating own custom decoder.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -