First off, thank you to anyone that can help I am really just a cocoa novice on a mission to write something useful
Background:
I am working on a preference pane front end to TivoMono which simply can put files on my tivo and transcode them on the fly for it.
I only need this preferance pane to really perform 4 different functions:
1) start the terminal process with mono Tivomono.exe --nodetails --noterminal Done
2) be able to stop the process Done uses pkill and works
3) read the settings.xml that TivoMono.exe reads to configure itself and set the gui buttons/drop downs to reflect the current settings.
XML File Example
4) If a save settings button is pressed then the preference pane needs to remake the settings.xml and replace the old one, kill the process and restart it.
What I need help with:
I am having a heck of a time opening this XML file properly and getting it to do what it needs to do. If anyone could get me pointed in the right direction that would be greatly appreciated. I've tried to read up on NSXML but examples are lacking unfortunately.
Here is my code so far if it helps:
homepage.mac.com/bedelman/TivoPref.zip
Thank you!
Background:
I am working on a preference pane front end to TivoMono which simply can put files on my tivo and transcode them on the fly for it.
I only need this preferance pane to really perform 4 different functions:
1) start the terminal process with mono Tivomono.exe --nodetails --noterminal Done
2) be able to stop the process Done uses pkill and works
3) read the settings.xml that TivoMono.exe reads to configure itself and set the gui buttons/drop downs to reflect the current settings.
XML File Example
Code:
<TiVoMono>
<Installpath>/TivoMono/</Installpath>
<FFMpeg_Path>/TivoMono/ffmpeg</FFMpeg_Path>
<FFMpeg_Aspect>4:3</FFMpeg_Aspect>
<FFMpeg_VideoBitRate>2048</FFMpeg_VideoBitRate>
<FFMpeg_FrameRate>24</FFMpeg_FrameRate>
<FFMpeg_AudioBitRate>128</FFMpeg_AudioBitRate>
<FFMpeg_AudioSampleRate>48000</FFMpeg_AudioSampleRate>
<FFMpeg_RestrictAudioSampleRate>false</FFMpeg_RestrictAudioSampleRate>
<FFMpeg_AudioCodec>mp2</FFMpeg_AudioCodec>
<FFMpeg_AudioChannels>2</FFMpeg_AudioChannels>
<FFMpeg_RestrictAudioChannels>true</FFMpeg_RestrictAudioChannels>
<FFMpeg_AudioSyncSamples>1</FFMpeg_AudioSyncSamples>
<FFMpeg_UseAsync>false</FFMpeg_UseAsync>
<Directory>/Volumes/HD2/TiVoNet/</Directory>
<AllowedExtensions>.3g2,.3gp,.4xm,.mtv,.roq,.aac,.ac3,.adts,.aiff,.alaw,.amr,.asf,.au,.avi,.avs,.crc,.daud,.dsicin,.dts,.dv,.dvd,.ea,.ffm,.flic,.flv,.gif,.gxf,.h261,.h263,.h264,.idcin,.ipmovie,.m4v,.matroska,.mjpeg,.mm,.mmf,.mov,.mp4,.m4a,.3gp,.mp2,.mp3,.mp4,.mpeg,.mpeg1video,.mpeg2video,.mpegts,.mpegvideo,.mpjpeg,.mulaw,.mxf,.nsv,.nuv,.ogg,.psp,.psxstr,.rawvideo,.rm,.s16be,.s16le,.s8,.shn,.smk,.sol,.svcd,.swf,.tiertexseq,.tta,.u16be,.u16le,.u8,.vcd,.vmd,.vob,.voc,.wav,.wc3movie,.wsaud,.wsvqa,.wv,.mpg</AllowedExtensions>
<UUID>190C7D52-C6F8-4D3C-A5FE-3D1710DFB898</UUID>
</TiVoMono>
4) If a save settings button is pressed then the preference pane needs to remake the settings.xml and replace the old one, kill the process and restart it.
What I need help with:
I am having a heck of a time opening this XML file properly and getting it to do what it needs to do. If anyone could get me pointed in the right direction that would be greatly appreciated. I've tried to read up on NSXML but examples are lacking unfortunately.
Here is my code so far if it helps:
homepage.mac.com/bedelman/TivoPref.zip
Thank you!