I am trying to create a desktop application that will load the itunes play list xml file and parse it using Haxe and the framework haxenme.
I think the issue that I am having may be the spaces in the file name not being escaped correctly but I'm not 100% sure on this.
Here is the code that I have so far.
package com.mattwallace.appname.actions;
import nme.Assets;
import haxe.xml.Fast;
class GetPlayListAction
{
public function new():Void
{
super();
}
public function execute():Void
{
var xml:Xml = Xml.parse(getXMLDesktopString());
trace(xml);
}
private function getXMLDesktopString():String
{
var xmlString:String = sys.io.File.getContent(
nme.filesystem.File.userDirectory.url +
"/Music/iTunes/iTunes Music Library.xml");
return xmlString;
}
}