decorative banner

Using the Element tab to edit elements


    In addition to simply finding elements, you can manipulate elements in a variety of ways by using these commands on the pop-up menu in the middle Action section of the Element tab:

    Keep Element

    Keeps the element and sets, updates, or deletes its attribute.

    Rename Element

    Renames the element, but keeps the element's contents. You can keep the element's attributes or change them with an Attribute action.

    Delete Element

    Deletes the element completely, including its start and end tags as well as its contents.

    Replace Element by its Content

    Deletes only the element's start and end tags, leaving its contents untouched.

    Delete Content Only

    Deletes only the contents of the element, leaving its start and end tags in place.

    Replace Content

    Replaces only the contents of the element, leaving its start and end tags in place. This command works on plain text contents only--for example, text that has a style applied to it such as bold is not affected by this command.

To modify an existing element:

  1. Define the search criteria and scope of the search as described in Searching for elements.
  2. Choose Keep Element from the pop-up menu in the top of the Action section.
  3. Click New Action to create an Attribute action.
  4. Select Set, Update, or Delete from the pop-up menu in the bottom of the Action section.
    • The Set option sets the specified attribute and value for the element whether or not the attribute already exists.
    • The Update option only updates the attribute if it already exists in the specified element. It does not add the attribute.
    • The Delete option removes the attribute and its value wherever it appears.
  5. Enter the attribute in the text box or choose an attribute from the menu to the right of the text box. (The pop-up menu displays only attributes relevant to the element selected in the Search section of the Element tab.)
  6. Enter the attribute's value in the Value text box or select a value from the menu to the right of the text box.
  7. Do one of the following:
    • Click Preview to see a list of files in the Find In section that are hits on the search criteria, but without carrying out the action specified in the Action section. To exclude a file from the action, select the file in the Find In section and click Remove. Then click Start to apply the action to the remaining files listed in the Find In section.
    • Click Start to begin the search and also carry out the specified action.

    The Element tab also lets you create multiple Attribute actions to be performed during a Keep Element action. Click New Action and follow the steps outlined here before you click Preview or Start. GoLive performs each Attribute action defined in the Action section. You can remove an Attribute action by selecting it in the list and clicking Delete Action.

To rename, delete, or replace an existing element:

  1. Define the search criteria and scope of the search as described in Searching for elements.
  2. Do one of the following:
    • Choose Rename Element from the pop-up menu in the top of the Action section. Then enter a new element name in the New Name text box. (You can create Attribute actions to a Rename Element action, if desired.)
    • Choose Delete Element from the pop-up menu in the top of the Action section.
    • Choose Replace Element by its Content from the pop-up menu in the top of the Action section.
  3. Do one of the following:
    • Click Preview to see a list of files in the Find In section that are hits, but without carrying out the command or action specified in the Action section. To exclude a file from the command or action, select the file in the Find In section and click Remove. Then click Start to apply the action to the remaining files listed in the Find In section.
    • Click Start to begin the search and also carry out the specified command or action.

To replace the plain text contents of an element:

  1. Define the search criteria and scope of the search as described in Searching for elements.
  2. Choose Replace Content from the pop-up menu in the top of the Action section. Then enter the replacement text in the Content text box. It is not necessary to use quotes around the text.
  3. Do one of the following:
    • Click Preview to see a list of files in the Find In section that are hits, but without carrying out the replacement. To exclude a file from the replacement, select the file in the Find In section and click Remove. Then click Start to replace the text in the remaining files listed in the Find In section.
    • Click Start to begin the search and also carry out the specified replacement.

To delete the contents of an element:

  1. Define the search criteria and scope of the search as described in Searching for elements.
  2. Choose Delete Content Only from the pop-up menu in the top of the Action section.
  3. Do one of the following:
    • Click Preview to see a list of files in the Find In section that are hits, but without carrying out the Delete Content Only command. To exclude a file from the command, select the file in the Find In section and click Remove. Then click Start to apply the command to the remaining files listed in the Find In section.
    • Click Start to begin the search and also carry out the Delete Content Only command.