Home Forums XMetaL Tips and Tricks Workaround: Automate replacement of ampersands in attributes with & Reply To: Workaround: Automate replacement of ampersands in attributes with &

Derek Read

Reply to: Workaround: Automate replacement of ampersands in attributes with &

Sorry, I must have been sleeping when I read your message about “errors”…

The errors you are seeing are not really “errors”, they are alerts I put in to help a developer understand the script. They appear on purpose so that someone that takes this demo code and integrates it into their own customization would see that it is navigating to each element in the document. It displays the element name, how many attributes that element has set and the value. Because this is demo code (meant to be integrated into a customization) I didn't want it to be usable right away. I wanted developers to read everything in the file and understand it and then test it before unleashing it on their users.

From my original post:
“Before using this script please read the notes and comments in the MCR file (which also includes some legal stuff).”

The information in the comments in the MCR include a description of the issue, how it works (the basic logic of the script), some warnings about how it deals with entities, how to install, how to uninstall, etc.

There is one line you would need to alter to suppress the alerts:

Application.Alert(rng.ContainerName + “:” + attrCount + “:” + attrValue);

Comment that out, or delete it, and you will not see any.

Reply

Products
Downloads
Support