1
我正在使用XML Tools 2(http://www.latenightsw.com/freeware/XMLTools2/index.html)在AppleScript中生成XML文件。我無法弄清楚如何將生成的XML文件保存到特定位置。使用XML工具2將Apple XML保存到指定位置2用於AppleScript
set theFilename to "test_xml"
set theXML to ¬
{class:XML element, XML tag:"FinalCutServer", XML contents:{¬
{class:XML element, XML tag:"request", XML attributes:{reqId:"setMd", entityId:"/asset/STRING_TO_BE_REPLACED"}, XML contents:{¬
{class:XML element, XML tag:"params", XML contents:{¬
{class:XML element, XML tag:"mdValue", XML attributes:{fieldName:" Title", dataType:"string"}, XML contents:{"test01"}}}}}}}}
set xmlPath to "Macintosh HD:XMLin:" & theFilename & ".xml" as Unicode text
generate XML theXML saving as xmlPath with generating UTF8
使用上面的代碼,返回以下錯誤:「‘對於文件的壞名聲一些對象’錯誤號-37」,並將其保存在我的HD根目錄下。無論如何要將它直接保存到特定位置,還是需要將其保存到根目錄然後移動文件?
我不知道我是怎麼錯過的!謝謝!! – RGilkes