Atomik Roundtrip 2.1: Working with Roundtrip > Chapter 18 Working with Structural Editing and Roundtrip Elements Palette << >>

18.1 Editing The Structure of your XML

As well as simply importing your XML file into QuarkXPress, Atomik Roundtrip has some very powerful structural editing features that can actually be used to add child elements, delete elements, remove and unlink elements from the page and change the order of the elements within your XML. The available functionality also allows you to edit the content of any new or existing XML elements and is especially useful for tasks such as adding extra paragraphs to text chains or editing existing elements before they have even been imported onto the page. Note; the functionality available is dependent on the DTD that the XML file conforms to.

To add a new child element to your XML

Say, for instance you wanted to add a new paragraph to your text chain; a good example of this would be adding a ‘Paragraph’ child element to the ‘ReviewText’ parent element in the documents used in ‘Tutorial 1’ (as described in Tutorial sections in previous section).

‘Import’ your XML file into the Roundtrip XML palette, drag the XML onto the QuarkXPress page and display the XML tab.

Find the first ReviewText element in the text chain, Ctrl/right click on it and from the pull down menu click on ‘Add New Child Element’ and select ‘Paragraph’. Note; in the menu you will only be shown any child elements that the parent element has been allowed to add as declared by the DTD.

Another way of adding an extra paragraph element is (in the relevant place on the page), simply press the Paragraph Return key whilst you are editing the XML text on the QuarkXPress page - if the DTD allows an extra paragraph child element to be added in the XML this new element will be added automatically to your XML file. This can then be saved and updated from page.

To edit the content of an XML Element

The content of each child element displayed in the XML tab of the Roundtrip XML palette can be edited by double clicking on the element name or highlighting the element and Ctrl/right clicking and selecting ‘Edit Element Content’ from the drop down menu.

When the element is double clicked, an ‘Edit Element Content’ dialogue is shown on screen which displays the current content of the element you have selected. If the element you have selected is a new child element that you have just added, the element name of the added element will be displayed in the Content window.

The content in the ‘Edit Element Content’ window can be updated and when the ‘OK’ button is selected, any changes will be written back to the imported XML file, this can then be saved and updated from page if necessary.

To remove an XML Element

If you need to remove any child elements from your XML, these can be either unlinked from the page (but left on the page), removed from the page or completely deleted from the XML.

In the XML tab of the Roundtrip XML palette by Ctrl/right clicking the undesired element and selecting the most suitable option from the pull down menu. This can then be saved and updated from page if necessary.

To change the order of an XML Element

If you need to change the order of an XML element, as long this is permitted by the DTD, it can be done by selecting the element in the XML tab of the Roundtrip XML palette and Ctrl/right clicking. ‘Move Up’ or ‘Move Down’ options can be selected from the pull down menu, this can then be saved and updated from page if necessary.

To find an XML Element on the page

This option is extremely useful if you are working with many or similar XML files on your QuarkXPress page. To find where an XML element is on your page, in the XML tab of the Roundtrip XML palette, select the element you would like to find. Note; elements that have been flowed onto the page will be highlighted in green within the palette. Ctrl/right click the element and select the ‘Select on Page’ option from the pull down menu.