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
0
votes
1 answer

Deserialisation error with SWXMLHash

I have the following XML structure (this is a stripped-down example): Some value ... MD Massive Dynamic With the following…
Extragorey
  • 1,654
  • 16
  • 30
0
votes
1 answer

Handling missing properties when deserializing xml using SWXMLHash

I've been following the examples at SWXMLHash to deserialize an XML file. It is working quite well, but I am not sure how to handle cases when the XML input is incomplete: For example, suppose the XML input is this:
Mantracker
  • 613
  • 10
  • 22
0
votes
2 answers

Get Value From XML Response Swift

I am using a Swift xml parser library located Here. I am looking to get a specific value from the below XML that has a certain value. The below XML shows a list of apps installed on a device and then lists information about each app; like version…
Martheli
  • 931
  • 1
  • 16
  • 35
0
votes
1 answer

swxmlhash conditional deserialization that may return nil

I'm using SWXMLHASH Swift library to parse some 3rd party XML data. This data can sometimes be returned with values that are not valid for my application. When this happens I wish to ignore this data and return nil instead of Self in my deserialize…
AlexM
  • 25
  • 5
0
votes
1 answer

Improve efficiency on downloading multiple XML files and parsing them

I'm downloading five XML files from the web server using Alamofire and parsing them using SWXMLHash. The last file depends on the first four files in a way that some of its entries refer to the entries contain in the first four. I use cascading…
KMC
  • 1,677
  • 3
  • 26
  • 55
0
votes
2 answers

Unable to parse XML from Webservice using SWXMLHash

I have the following code using SWXMLHash - the XML parser however does not appear to be able to process it. I have checked the URL to make sure it returns data: let baseUrl =…
HillInHarwich
  • 441
  • 6
  • 25
0
votes
1 answer

SWXMLHash compact root element

I have a question I hope will be quick. I am parsing XML returned by eBay’s API using SWXMLHash for Swift. Some of the returns get quite verbose. such as: …
Joshua Olson
  • 5
  • 1
  • 3
0
votes
1 answer

Deserialising a class with SWXMLHash in Swift 3

I'm trying to deserialise XML to a class using the example provided at the end of the readme, but it's raising the same compile time error as originally provoked this question. method 'deserialize' in non-final class 'Element' must return Self to…
Oliver Cooper
  • 849
  • 7
  • 20
0
votes
0 answers

Save data from SWXMLHash

I got this set of response data: 3 Within Klang Valley 3 Within…
bobo
  • 121
  • 2
  • 10
0
votes
1 answer

How should i save the xml child element value? [swift]

i have this set of xml that i needed to save the category of price_options, but how do i save it? For now i using SWXMLHash, but i don't know how to save it: 2015-02-27 18:27:21
minimomo
  • 581
  • 1
  • 6
  • 16
0
votes
1 answer

How can I use a third party library: SWXMLHash in the playground ?

I'm using SWXMLHash to parse an xml file in my project, It works fine in the project but I would like to make some tests in a playground. I keep having an error when I want to use the library in the playground: Playground execution failed:…
AziCode
  • 2,510
  • 6
  • 27
  • 53
0
votes
1 answer

how to use more efficiently SWXMLHash and how to set the class that will receive the data properly?

I'm building a project for a train schedule app, and I'm using an API that returns an XML file,to manipulate the data i'm using the library called SWXMLHash. I need to extract the name of the departure station with its destinations and departure…
AziCode
  • 2,510
  • 6
  • 27
  • 53
0
votes
1 answer

SWXMLHash iterating Error

I am new to Swift, writing my first application with network requests. For testing purposes, I created an application with the frameworks Alamofire and SWXMLHash for parsing the xml-data from the request. In general, it works fine (more or less, I…
hallleron
  • 11
  • 1
  • 4
0
votes
1 answer

Loop through xml NSData variable and get values in swift 2.1

I'm new to swift programming. I wrote a code which gets xml output from rss feed and parse it into NSDATA type, then I want to get title and image src values from it in a loop and send them to a table view to create a list. when I get those values…
anonymox
  • 419
  • 1
  • 9
  • 32
-1
votes
1 answer

Swift variable to choose struct

new approach to ask my question. I thought it was clear but apparently not. :-D 2nd chance. I use SWXMLhash to get information from websites. For each website i need a different struct, because the datastructure of each website is different. I have…