Skip to content
Advertisement

Tag: xml-parsing

Open XML file in AppleScript with JavaScript syntax

I am writing my first bigger AppleScript and as I am usually developing TypeScript, I decided to use the JavaScript version of AppleScript. I need to read and parse an XML file. Apple has an Example for that on their documentation, however the documentation only has an example in the AppleScript syntax, not in the JavaScript syntax: https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/WorkwithXML.html#//apple_ref/doc/uid/TP40016239-CH67-SW1 How do

Some content lost while parsing string to xml

I have got some HTML code through AJAX responseText, which is 350-400 lines long. It has been stored in the variable text as string and I would like to parse it to XML. However, some of the content is removed while parsing. The result ends in the script part and none of the body part of the code can be

Advertisement