Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I googled and found "AEXML" framework for SWIFT programming. I got confused to access the tags from "AEXMLElement".
- <?xml version="1.0" encoding="utf-8" standalone="no"?>
- <rss version="2.0">
- <channel>
- <title>ComputerWeekly: Latest IT News</title>
- <link>http://computerweekly.techtarget.com/rss/Latest-IT-news.xml</link>
- <description>Follow the latest technology news that matters to UK IT leaders and IT professionals, as it happens, from the UK’s leading technology publication.</description>
- <language>en-us</language>
- <copyright>Copyright TechTarget - All rights reserved.</copyright>
- <docs>http://computerweekly.techtarget.com/rss/Latest-IT-news.xml</docs>
- <generator>Techtarget Feed Generator</generator>
- <managingEditor>editor@computerweekly.com (Editor)</managingEditor>
- <webMaster>webmaster@techtarget.com (Webmaster)</webMaster>
- <ttl>60</ttl>
- <image>
- <width>175</width>
- <height>33</height>
- <title>ComputerWeekly</title>
- <link>http://computerweekly.techtarget.com/rss/Latest-IT-news.xml</link>
- </image>
- <lastBuildDate>Tue, 6 Oct 2015 03:36:45 EDT</lastBuildDate>
- <item>
- <title>UCHL mobile healthcare service demonstrates the potential future of the NHS</title>
- <link>http://www.computerweekly.com/news/4500254844/UCHL-mobile-healthcare-service-demonstrates-the-potential-future-of-the-NHS</link>
- <description>A mobile screening service which combines medical and information technologies could be an early example of healthcare in the future</description>
- <author>ComputerWeekly.com(editor@www.com)</author>
- <pubDate>Mon, 5 Oct 2015 12:20:50 EDT</pubDate>
- </item>
- <item>
- <title>Security Think Tank: Addressing the gap between security data and intelligence</title>
- <link>http://www.computerweekly.com/opinion/Security-Think-Tank-Addressing-the-gap-between-security-data-and-intelligence</link>
- <description>What is the best practice for collecting and using threat indicators from security incidents to improve defences against future cyber attacks?</description>
- <author>Mike Gillespie(editor@www.com</author>
- <pubDate>Mon, 5 Oct 2015 12:00:07 EDT</pubDate>
- </item>
- </channel>
- </rss>
- let xmlDoc = try AEXMLDocument(xmlData: responseData!)
- if let items = xmlDoc.root ["channel"]["item"].all {
- print("Items: (items)")
- for item in items {
- print("Item: (item.value)")
- if let name = item.value {
- print("Name: (name)")
- }
- }
- }
- Items: [<RevealControllerDemo.AEXMLElement: 0x7f98e3d68ec0>, <RevealControllerDemo.AEXMLElement: 0x7f98e3d70440>, <RevealControllerDemo.AEXMLElement: 0x7f98e3d74b70>, <RevealControllerDemo.AEXMLElement: 0x7f98e3d799f0>, <RevealControllerDemo.AEXMLElement: 0x7f98e3eebb20>, <RevealControllerDemo.AEXMLElement: 0x7f98e3ef90c0>, <RevealControllerDemo.AEXMLElement: 0x7f98e6002d90>, <RevealControllerDemo.AEXMLElement: 0x7f98e6006da0>, <RevealControllerDemo.AEXMLElement: 0x7f98e600c620>, <RevealControllerDemo.AEXMLElement: 0x7f98e6010de0>, <RevealControllerDemo.AEXMLElement: 0x7f98e60152b0>, <RevealControllerDemo.AEXMLElement: 0x7f98e601c710>, <RevealControllerDemo.AEXMLElement: 0x7f98e6022290>, <RevealControllerDemo.AEXMLElement: 0x7f98e6026790>, <RevealControllerDemo.AEXMLElement: 0x7f98e602b560>, <RevealControllerDemo.AEXMLElement: 0x7f98e60316b0>, <RevealControllerDemo.AEXMLElement: 0x7f98e6036480>, <RevealControllerDemo.AEXMLElement: 0x7f98e603ad50>, <RevealControllerDemo.AEXMLElement: 0x7f98e60414a0>, <RevealControllerDemo.AEXMLElement: 0x7f98e6045560>]
- Item: nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement