1 person found this helpful
How is your text data stored in the XML? It should be using the format <![CDATA[You text here]]>
Also make sure you use the .toSting() when transferring your XML data to an ExtendScript var.
i think i forgot th toString()
thanks a lot
it isnt the toString because the error occurs when the script starts read de xml file.
It stops the execution because find this char
I was just relooking at my script that uses XML to place info on images. I didn't use the toString for that. I did make sure I used the CDATA to store the values in the XML, then I just transferred that value to a variable, then use that variable to set the text in the document. I even ran a test using the "&" and it worked. Here's the line from my XML that uses the "&"
<item blockType="0" sText="" ><![CDATA[This & That]]></item>
This is the line of text I use to pull that info back out. It's a from a loop that goes through the entire XML puts the info back into a UI variable.
currentXMLVal = x.presets.preset[n].child(d.children[i].name);
but my script only read the xml file and pass the information to photoshop, loading images and text.
the problem is when the script starts they reade the xml but if he find an & char he give me an error
Can you post an example your XML and how you read it?
IIRC, to put a '&' into a ScriptUI element, you need to have '&&' instead. Of course, this may vary from version to version.