I want to read the url attribute of this element using NSXMLParser:
url
<enclosure url="http://www.marketoloji.com/wp-content/uploads/2015/01/IMG_1649-110x110.jpg" length="7113" type="image/jpg"/>
I found this resource on the Apple website, but it is for obj C, not Swift:
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/XMLParsing/Articles/HandlingElements.html#//apple_ref/doc/uid/20002265-BCIJFGJI
I know that I have to work with the attributeDict dictionary in didStartElement , but I donβt know how to do it.
attributeDict
didStartElement
I found out about this, and here is how it works in Swift:
in the didStartElement method;
if element.isEqualToString("enclosure") { var imgLink = attributeDict["url"] as String }
Source: https://habr.com/ru/post/1212912/More articles:Is there an LLVM-based programming language that can guarantee reliable fast sandbox binaries? - securityhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1212908/travis-ci-build-when-repository-is-first-added&usg=ALkJrhgnkpyMiFnLjwBWhlyK5BxL7JZMzAConfiguring a nginx reverse proxy, 768 worker_connections are not enough when connecting to an upstream - proxyReplacement for goto statement in Swift - control-flowHaskell lambda expressions and simple logical formulas - lambdaHow to get the default value for an optional parameter using the Dart analyzer API? - dartHow do I enable the Chrome Web Store Publishing API? - google-chrome-extensionhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1212915/how-can-i-get-source-maps-to-work-when-running-tests-using-ember-qunit-for-an-ember-app-built-on-ember-cli&usg=ALkJrhgj9suO0L4zR1cCoovXUZEF-uRMNQHow to create a function - functionDoes anyone know any API for OCRing 7-segment display for Windows Phone? - c #All Articles