I want to generate an XML document in iOS. My primary goal is to generate it using inbuilt classes/libraries. I researched a lot and I found that NSXMLElement, NSXMLDocument etc are used to generate XML in OS X but not in iOS (correct me if I'm wrong about this). I found some of the third party libraries like GDataXML, APXML etc which generates the XMLDocument as per my needs. But, I'm trying hard to achieve the same using inbuilt classes (if any). BTW, I do not want the strings to be appended manually to create XML.
I'm not expecting a complete code which does the generation. Any help/suggestion on any inbuilt classes would be appreciated.
Thanks in advance.
You're right -- you need to look for a 3rd party solution for XML writing in iOS. For parsing, there is NSXMLParser.
Related
Currently, I got a task to explore google flatbuffers on iOS and OSX. I explored the documentation provided by Google.
Also found some libraries on Github on swift language like FlatBuffersSwift and others that implement the flatbuffers.
So, I have mainly two concerns on that
Will Apple approve my app if I used this in my iOS application?
Is it possible to create schema on runtime from JSON ? or we must manually create schemas (.fbs) and use flatc library for creating model binaries (like .swift) files.
Any help please
Thanks in advance
1) There's nothing in the Apple approval process that has to do with your choice of serialization library.
2) To get the benefits of this library, you want to create a schema and generate code for it ahead of compilation time. If your use case is so dynamic that you want to be able to do everything at runtime, you're probably better off with a good JSON library.
For generating PDF files we can use Core Graphics. Similarly is there any framework / class that can be used for generating .ppt (power point presentation) files via code ? Or is there any third party framework for this purpose.
There's no in-built Apple API, and I've never heard of a third-party framework for this.
Seems there are still no open source solutions for this for iOS platform. Aspose seems to have something and another commercial that pretty recently emerged - libpptx.com, at least it provides some generic functionality to craft pptx
Hello stackoverflow community..
Currently I'm developing a Crossplatform-App (android/iOS) which generates beside its other features pdf-files from user-content.
This works well with the help of jsPDF.
The output of this awesome library is an base64 encoded string of the binary PDF-File.
(see this issue of the creator about the 'binaryness' of pdf files under different circumstances on github).
Now my actual problem:
I need to save this base64 as a proper decoded binary file for further usage on different aspects of the system (mailing it, printing it, a.s.o.).
For Android there is a Plugin that does a similar thing with images. My current plan is to modify and publish it as a more generic plugin for saving base64 encoded to a file.
Problem is now, I cannot find a similar code for iOS, and since I have literally no experience in Objective-C (plenty of Java, ruby, javascript and c though), I'm not able to produce such a plugin in short time.
Do you guys know a plugin of this kind, which can be modified with little Objective-C knowledge.
Perhaps there is someone interested in developing this kind of plugin and we cut could a deal (the project I'm working on is commercial)
Hope to hear some interesting responses, because I'm running out of ideas here :D
Greetings
Jakob
I am creating a IOS phone directory app. I am trying to download a XML file from a url. This XML file will then be used to populate the directory app with phone numbers, names and identifications of all the people in the directory. I'm new to IOS development and I'm looking for any information or assistance on where to get started on how to parse the XML file.
What is included with Cocoa is NSXMLParser, and you can download the source code imageMap. There are also other third party libraries such as TouchXML and TBXML. Although in my experience TouchXML has some memory leaks issues that can create a lot of problems. And the one that has given me the fastest results is TBXML by far.
You can find a detailed article on all the available third-party parsers available here: Best xml parser for your app
TBXML is the way to go IMO. I have a complete code sample if you need it. If you post the structure of that XML file, I can modify the sample to fit your needs.
If you are creating the webserver manually, then I would look into using JSON instead of XML. It's a bit easier to work with. If you need to use XML, the NSXML parser class works pretty well. Here is a good tutorial: http://www.xcode-tutorials.com/parsing-xml-files/
Or you could check out chapter 21 I believe of the big nerd ranch iPhone programming book for a more detailed explination.
Good Luck!
I am developing an app for iPad, and I need to modify several attributes in a XML file at runtime.
I found the class NSXMLDocument. But I haven't been able to import it to my project.
Is this class not available for iPhone/iPad development?
Is there some other approach I can consider?
I read about libxml library. Is it my answer or there is a better approach?
NSXMLDocument is MacOS X Cocoa only. You have available on iPhone NSXMLParser, and several external libraries built on libxml2 - TouchXML, KissXML and a couple of others.
Note that KissXML supports writing XML.
Other XML libraries that have been suggested include the XML support from Google Data and VTD-XML.
You are looking for a DOM XML parser, which is best for modification of XML documents. See for example this tutorial - without mapping to and from Model Objects - use the XPath.