how can I use XMLParser to parse that specific data (title, image, author, date, content, etc.) and map it to the specific variables? OK, let's concentrate on this issue.
If you want to work with XMLParser, you need to implement a class conforming to XMLParserDelegate.
Creating a subclass of XMLParser and making itself conform to XMLParserDelegate is an often found pattern, though it is not necessary.
import Foundation
struct Article {
		var title: String = ""
		var date: Date?
		var author: String?
		var img: URL?
		/// content in HTML
		var content: String = ""
}
class ArticlesParser: XMLParser {
		// Public property to hold the result
		var articles: [Article] = []
		
		var dateTimeZone = TimeZone(abbreviation: "GMT-6")
		lazy var dateFormater: DateFormatter = {
				let df = DateFormatter()
				//Please set up this DateFormatter for the entry `date`
				df.locale = Locale(identifier: "en_US_POSIX")
				df.dateFormat = "MMM dd, yyyy"
				df.timeZone = dateTimeZone
				return df
		}()
		
		private var textBuffer: String = ""
		private var nextArticle: Article? = nil
		override init(data: Data) {
				super.init(data: data)
				self.delegate = self
		}
}
extension ArticlesParser: XMLParserDelegate {
		
		// Called when opening tag (`<elementName>`) is found
		func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [String : String] = [:]) {
				switch elementName {
				case "posts":
						nextArticle = Article()
				case "title":
						textBuffer = ""
				case "date":
						textBuffer = ""
				case "author":
						textBuffer = ""
				case "img":
						textBuffer = ""
				case "content":
						textBuffer = ""
				default:
						print("Ignoring \(elementName)")
						break
				}
		}
		
		// Called when closing tag (`</elementName>`) is found
		func parser(_ parser: XMLParser, didEndElement elementName: String, namespaceURI: String?, qualifiedName qName: String?) {
				switch elementName {
				case "posts":
						if let article = nextArticle {
								articles.append(article)
						}
				case "title":
						nextArticle?.title = textBuffer
				case "date":
						print("date: \(textBuffer)")
						nextArticle?.date = dateFormater.date(from: textBuffer)
				case "author":
						nextArticle?.author = textBuffer
				case "img":
						print("img: \(textBuffer)")
						nextArticle?.img = URL(string: textBuffer)
				case "content":
						nextArticle?.content = textBuffer
				default:
						print("Ignoring \(elementName)")
						break
				}
		}
		
		// Called when a character sequence is found
		// This may be called multiple times in a single element
		func parser(_ parser: XMLParser, foundCharacters string: String) {
				textBuffer += string
		}
		
		// Called when a CDATA block is found
		func parser(_ parser: XMLParser, foundCDATA CDATABlock: Data) {
				guard let string = String(data: CDATABlock, encoding: .utf8) else {
						print("CDATA contains non-textual data, ignored")
						return
				}
				textBuffer += string
		}
		
		// For debugging
		func parser(_ parser: XMLParser, parseErrorOccurred parseError: Error) {
				print(parseError)
				print("on:", parser.lineNumber, "at:", parser.columnNumber)
		}
}
You have no need to implement all the methods defined in XMLParserDelegate, depending on the content of the xml.
If the actual xml is more complex than the example, you need to re-write many parts of this code.
You can use it like this:
(Assuming data is containing the xml as Data.)
										let parser = ArticlesParser(data: data)
										if parser.parse() {
												print(parser.articles)
												//...
										} else {
												if let error = parser.parserError {
														print(error)
												} else {
														print("Failed with unknown reason")
												}
										}
One more, the xml header should be something like this:
<?xml version="1.0" encoding="UTF-8"?>
I guess it is broken when you post the example. But if the API actually returns such a header, you may need to fix the API.