We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Copy link to clipboard
Hi Team, I am tring to get XML element into a labeled textframe. but am getting error as "XMLelement us read only".Sample Code:
var XMLElement = app.activeDocument.xmlElements;XMLElement.placeXML(app.activeDocument.pages.textFrames.itemByName("FIRST"));
kindly refer attached snap.
Just change the name of your variable. There's a reason why "my" is used at the start of variable names in sample code. You're trying to access the DOM with that variable name.
var myXMLElement = app.activeDocument.xmlElements;
Thanks @brianp311,But getting another error,I need place XML element into a labeled textframe.
But facing error.
Check that the text frame isValid before passing it to the placeXML method. It does not appear that you have a valid text frame. What does your layer panel look like with that green frame selected?