I have this shell command that return xml data.
I'm new to Objective-C. I want to load in some XML using the system()
function.
Can anyone help me or point me in the right direction?
Thanks in advance.
I have this shell command that return xml data.
I'm new to Objective-C. I want to load in some XML using the system()
function.
Can anyone help me or point me in the right direction?
Thanks in advance.
You can't use system()
for that, because it doesn't return any data from the command to you. Instead, all of the program's output will go to the terminal.
The Cocoa way to do this is NSTask
.
You need to:
setLaunchPath
and optionally setArguments
to specify what program to runNSPipe
to setStandardOutput
launch
the program