Coder Social home page Coder Social logo

bdxmlparser's Introduction

BDXmlParser

XmlParser For Swift

Anyone who want Normal Dictionary From Their XML data Response Can use below Function. Pass Data coming from Api response and have Dictionary in return of it.

I have used Class Created below To get Dictionary From XML data.

let objXmlParser = BbXmlParser()

let dictResponse = objXmlParser.getdictionaryFromXmlData(data!)

print(dictResponse)

And here You go with dictionary. :)

bdxmlparser's People

Contributors

bhaavik avatar harshitdaftary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bdxmlparser's Issues

Crash issue

The code will crash at self.arrStack.append(self.elements) because the self.elements is nil value:

`//Pass Xml Data and Fetch Dictionary From it.
func getdictionaryFromXmlData(xmldata:NSData) -> NSDictionary
{
    self.arrStack.append(self.elements)
    self.parser  = NSXMLParser.init(data: xmldata)
    self.parser.delegate = self
    self.parser.parse()
    let dictResponse = self.arrStack[0] as! NSDictionary
    return dictResponse
}`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.