ios - Xml + schema in swift -
about NSXMLParser , but I need to use all the data in the XML-document Is know
I have read, that supports the strong <> NSXMLParser schema, I'm new in the development of iOS, you can show me a small example, how do I json You can parse the XML-document with the schema like the document; <
on jsonResult: NSDictionary = NSJSONSerialization.JSONObjectWithData (self.data, options: NSJSONReadingOptions.MutableContainers, Error: Zero) NSDictionary As NSDictionary thanks
I created this new simple and light XML parser for swift in swift -!
You can use XML data to read like this :.
go someValue = XmlDocument ["element"] ["child"] ["anotherChild"] value or you can use it like this To create XML string:
go to document = AEXMLDocument () element = document.addChild ("element") element. AddChild ("ch Ild") document.xmlString // returns the XML string of the entire document structure I hope that helps.
Comments
Post a Comment