I need to be able to parse an xml file inside photoshop, using javascript. I tried activex but it didn't work. How do I go about parsing it. Does javascript itself has an xml parser?
+1
A:
No, JavaScript is a relatively compact language -- things like XML parsing, etc in browsers comes from the DOM.
This is part of the reason JSON is becoming increasingly popular for JS developers -- it is much simpler, but does much of what developers traditionally use XML for, and has multiple pure JS parser implementations, is actually syntactically compatible with JS (so eval, etc will work -- though they're unsafe if given untrusted content) -- and in SpiderMonkey at least JSON is available as part of the base JS implementation.
olliej
2009-03-30 22:42:38