Questions tagged [swxmlhash]

SWXMLHash is a third-party XML parser for swift

SWXMLHash is a third-party XML parser for Swift that wraps NSXMLParser.

Links:

https://github.com/drmohundro/swxmlhash

Related tags:

46 questions
1
vote
1 answer

how to check if parsed rss variable contain exact element in swift 2

I have a rss link which I parse it using SWXMLHash and then I use it's elements like below but when an element is missing in the rss I get below error message! how can I check if rss contain for example source element if it doesn't contain it put "…
anonymox
  • 419
  • 1
  • 9
  • 32
1
vote
1 answer

Can't return value parsing XML using SWXMLHash in Swift

When I try to show "50%", which is taken from forecast > area > forecast-period > text > probability_of_precipitation it comes up with "nil" on my label in the storyboard. I have this snippet of XML, which is located at a public ftp address…
0
votes
1 answer

How to deserialize nested element with SWXMLHash?

I have been trying to deserialized a nested XML with SWXMLHash, I was wordering if someone could help me ? I apologize in advance, I'm new to this stuff. Thanks in advance for helping. here is an extract of the XML :
Stee Ve
  • 3
  • 2
0
votes
1 answer

Swift, xml parsing with SWXMLHASH

I 've been trying to parse some part of xml including CDATA and I don't understand why the cdata was not showing at all. I ve been trying to solve this problem with SWXMLHASH Below is the xml
WTH_MD
  • 15
  • 3
0
votes
0 answers

SWXMLHash parse nested children

Playing around with SWXMLHash, I am trying to pull out an element and then get its info. My xml file is large and I'd like to split up the parsing in smaller functions. For example, this is from the GitHub page: let xml = """
koen
  • 5,383
  • 7
  • 50
  • 89
0
votes
0 answers

Deserializing a XML sequence with SWXMLHash

I want to deserialize a sequence of a group of tags with SWXMLHash. This is an example XML: First Place 6.775907 51.429786 6.775907
PeeWee
  • 11
0
votes
0 answers

How to get only part of an element's text using SWXMLHash

Say I have an XML file like we have Apples, Bananas, African Coffee Table, …
0
votes
2 answers

drmohundro/SWXMLHash and escaping values in Swift

I have working on a project that handles xml responses. After a search I found a library on github drmohundro/SWXMLHash that works inspired on the "Swifty JSON". After a while using it, I have realised that I can't get values with escaping…
Reimond Hill
  • 4,278
  • 40
  • 52
0
votes
0 answers

Unable to import module SWXMLHash

Running Xcode 9.3 I cloned the repo, opened the workspace and let the playground run. I got an error: No such module 'SWXMLHash' So I closed down everything and ran again on the simulator. Received the same error. I then tried bringing the…
Allen
  • 219
  • 2
  • 12
0
votes
2 answers

Cannot assign 'AppDelegate' to 'UNUserNotificationCenterDelegate'

I'm following this tutorial: https://medium.com/flawless-app-stories/ios-remote-push-notifications-in-a-nutshell-d05f5ccac252 But for some reason, I'm getting cannot assign 'AppDelegate' to 'UNUserNotificationCenterDelegate'. What does that line…
user6728767
  • 1,123
  • 3
  • 15
  • 31
0
votes
1 answer

SWXMLHash: how to build struct for very deep XML?

I am now working on a complex XML parsing. Here is the link: https://www.reddit.com/hot/.rss I use Alamofire to fetch data: protocol APIUsable { } struct API: APIUsable { static func fetchRedditFeedListData() -> Observable<[Entry]>{ let URL =…
BeauZ
  • 1
  • 1
0
votes
1 answer

SWXMLHash can't parse a [XMLIndexer]

I am trying for first time to parse a XML file and I am using SWXMLHash. My xml file is:
P S
  • 527
  • 4
  • 18
0
votes
1 answer

SWXMLHash EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I just converted my project to swift 4, but I having error when I emulate my app with SWXMLHash: var code: Int! = nil var message: String! = nil var paramsContent: String! = nil let xmlStrData = SWXMLHash.lazy(strData) let…
Ben
  • 761
  • 1
  • 12
  • 35
0
votes
2 answers

Swift: Error ignores try statement

In my code I'm deserialising some XML using the SWXMLHash library. Its .value() method has the throws keyword in its declaration, as do any custom deserialise functions. I have the following line of code: let myValue : UInt8 = try?…
Extragorey
  • 1,654
  • 16
  • 30
0
votes
0 answers

Index out of range during tableView.reloadData

I am having performance issues and index out of range errors during some refreshes. Not all, but I am struggling to troubleshoot it. Basically, the app will collect data from an RSS feed and display it in a tableview. This is my first time using…
DanTdd
  • 342
  • 3
  • 10