beautypg.com

Dreamweaver.getnewdocumentdom(), Dreamweaver.getrecentfilelist(), Dreamweaver.importxmlintotemplate() – Adobe Dreamweaver API Reference CS5 User Manual

Page 262

background image

257

DREAMWEAVER API REFERENCE

Document

Last updated 8/27/2013

dreamweaver.getNewDocumentDOM()

Availability
Dreamweaver MX; added

documentType

argument in Dreamweaver 8.

Description
Provides access to the editable tree for a new, empty document. This function works in the same way as the

getDocumetDOM()

function, except that it points to a new document, not an existing one, and does not open the

document.

Arguments
{documentType}

The documentType argument is a string. Its value must be a document type specified in the DocumentTypes.xml file.

Returns
A pointer to a new, empty document.

Example
The following code returns the DOM for a new, empty document:

var theDOM = dreamweaver.getNewDocumentDOM();

dreamweaver.getRecentFileList()

Availability
Dreamweaver 3.

Description
Gets a list of all the files in the recent files list at the bottom of the File menu.

Arguments
None.

Returns
An array of strings that represents the paths of the most recently accessed files. Each path is expressed as a file:// URL.
If there are no recent files, the function returns nothing.

dreamweaver.importXMLIntoTemplate()

Availability
Dreamweaver 3.

Description
Imports an XML text file into the current template document. This function operates on the document that has focus,
which must be a template. If you do not specify a filename argument, Dreamweaver opens a dialog box to request the
import file string.