I’m trying to convert a AppleScript record to NSXMLDocument and then read it out as a string to add it the XMP metadata of a InDesign file.
I start with the following code
set allCheckboxes to {"Jachtdagen", "Dagen"}
set rootElement to current application's NSXMLNode's elementWithName:("checkboxesToCross")
repeat with v from 1 to count of allCheckboxes
set _value to item v of allCheckboxes
set newElement to (current application's NSXMLNode's elementWithName:"checkboxes" stringValue:_value)
(rootElement's addChild:newElement)
end repeat
set _XmlDoc to current application's NSXMLDocument's alloc()'s initWithRootElement:rootElement
And now I want to have the _XmlDoc as text, but I can’t figure it out…
Any help greatly appreciated.