Create XML files dynamically - objective-c

I am working on a web service based iPad application. Since the application is fully based on web service I have to create a lot of xml files for web service request. Now I am hardcoding the xml request and passing parameters into it. Is there any way to create xml files dynamically in objective C ?

No need to hardcode.
You can automate the task by creating xml files.
You can yourself create an xml creator to create files according to your need.
Or ,
You can get help from here.

Check out KissXML on github, you create node objects and add children e.t.c. to make XML file out of it, I am using it to make KML files, works well.

Related

Maintain Product Image URL in Moqui

Our product-specific images are at CDN and we want to store the image URL.
I found that we can do it in ProductContent with image type [PcntImageUrlOriginal]. Do we have an existing service?
You can use the inbuilt crud service:
create#mantle.product.ProductContent and set the contentLocation to a url I guess
The following is not an option as it receives the contents of the file as well as the extension but down below uses the inbuilt crud service.
mantle.product.ProductServices.create#ProductContent
declared in mantle-usl/service/mantle/product/ProductServices.xml

Exporting WebCenter Content to XML

I am attempting to migrate content from an Oracle's WebCenter CMS into our organizations primary CMS. All the different parts of the page templates are separate xml snippets that get pull together and converted into html for production deployments. I am trying to find a way to export the page into xml to just get at the content. I don't need styles or js or images.
There are some built in web services and an ability to create custom ones. Is there any way to get the system to output xml or get the xml to give me a mapping of all the files so I can merge them myself?
Not sure if this will do what you want, but if you add &IsSoap=1 to the end of the URL then the request is returned in XML format. You can view the page data by using the following settings:
• IsJava
• IsSoap
• IsJson
• IsPageDebug
These may help as well. Here and here.
If this is for a Site Studio website, you should be able to turn on sitestudio section tracing, clear the server ouput, view the website page, refresh the output and it should show you details about the content items it retrieved.

Create custom feed in opencart

I want to create a product feed in opencart. But I have problem, where I can't understand how can I periodically once in 3 hours update that feed.
Is there any examples or tutorials how to create automatic processes?
Because the solution what I am thinking of is to create controller witch updates feed upon execution -> create unix or winx cron-job, but as I scroll trough internet those feed extensions doesn't use those...
The XML feeds could be created in two general ways:
have a service under specific URL that when hit will create the very up to date XML dynamicaly
have a service that is manualy run at certain time that creates a static XML feed that is then accessed and read
I guess that You are asking about the second case while mixing the first case in.
To answer Your question - You would need to use the second case thus have a controller that creates a static XML feed file saved somewhere on the server. The action of that controller will then be called via crontab to update the XML file (or just to throw the old one away and create a new one).
I do not see any problem here... Do You?

Document Construction Api

I'm currently building a API service that accepts Input in HTTP Requests, processes the information, uses a template engine (Currently Jade) to parse the Template files and then outputs in either HTML, PDF or a Image.
I would like to have this service not be bound to a Database, as I don't see a need for it. The service has one goal, accept input and output the result in the desired format.
Currently I can't decide on how to store and read my templates, it's a new world without a database....
Do I store them in a folder such as "templates" which I read each time I want a list of templates ? But have no idea how and if file locks will cause problems ?
Any suggestions ?
Have a look at Express.js it will allow you to set up a project with a good default directory structure. By default it stores Jade templates in 'views'. There will be no problems with file locking.
One other thing I would do is separate the API service from the view rendering. At the moment I use restify for pure REST services it is specifically geared toward that use case. So the workflow would roughly look as follows
'views' folder <--> Jade templates <--> Express <--> JSON data <--> REST API

Runtime xml/json generation of directory content

For an ios app I try to develop, I need to get a listing of the content of an online directory. (My app works with local directories but I'm trying to edit it so it works with an online directory)
I've been looking into this a lot but I can't manage to find the best solution to do this. (I learned you can't read the contents of an online directory and subdirectories with objective-c and print them to an array to display them in, for example, a tableview).
I did learn how to create a connection and output the html of a certain page (or an xml file). That's why I was wondering... Is there a way (webservice?) to generate an xml/JSON/html file that prints the content of a directory (if possible also subdirectories)? The generation of this xml/JSON/html has to be done at runtime, the moment my app asks for the file, since people will be able to add files (pdf's, video's,...) to the directory via FTP. (editing the xml/JSON file everytime is not an option).
Any help would be very much appreciated.
You could create a simple webservice in many ways. For example, with PHP you could write something like this:
<?php
$dir = '/myDir';
$files = scandir($dir);
echo json_encode($files);
?>
Then just point your app to get the contents of that page and parse the JSON.
scandir: http://php.net/manual/en/function.scandir.php
json_encode: http://php.net/manual/en/function.json-encode.php