Macromedia dreamweaver 8-using dreamweaver Manuel D’Utilisation
Exporting and importing template XML content
331
To export a document’s editable regions as XML:
1.
Open a template-based document that contains editable regions.
2.
Select File > Export > Template Data as XML.
The Export Template Data as XML dialog box appears.
3.
Select one of the Notation options:
■
If the template contains repeating regions or template parameters, select Use Standard
Dreamweaver XML Tag.
Dreamweaver XML Tag.
■
If the template does not contain repeating regions or template parameters, select Use
Editable Region Names as XML Tags.
Editable Region Names as XML Tags.
4.
Click OK.
A dialog box appears for you to save the XML file.
5.
Select a folder location, enter a name for the XML file, then click Save.
Dreamweaver generates an XML file that contains the material from the document’s
parameters and editable regions, including editable regions inside repeating regions or
optional regions. The XML file includes the name of the original template, as well as the
name and contents of each template region.
parameters and editable regions, including editable regions inside repeating regions or
optional regions. The XML file includes the name of the original template, as well as the
name and contents of each template region.
To import XML content:
1.
Select File > Import > Import XML into Template.
The Import XML dialog box appears.
2.
Select the XML file, then click Open.
Dreamweaver creates a new document based on the template specified in the XML file. It fills
in the contents of each editable region in that document using the data from the XML file.
The resulting document appears in a new Document window.
in the contents of each editable region in that document using the data from the XML file.
The resulting document appears in a new Document window.
NO
TE
Content in the non-editable regions is not exported to the XML file.
TIP
If your XML file isn’t set up exactly the way Dreamweaver expects, you might not be able
to import your data. One solution to this problem is to export a dummy XML file from
Dreamweaver, so that you’ll have an XML file with exactly the right structure. Then copy
the data from your original XML file into the exported XML file. The result is an XML file
with the correct structure that contains the appropriate data, all ready to be imported.
to import your data. One solution to this problem is to export a dummy XML file from
Dreamweaver, so that you’ll have an XML file with exactly the right structure. Then copy
the data from your original XML file into the exported XML file. The result is an XML file
with the correct structure that contains the appropriate data, all ready to be imported.