252
Chapter 14: Document
File manipulation functions
File manipulation functions handle creating, opening, and saving documents (including XML
and XHTML), converting existing HTML documents into XHTML, and exporting CSS to
external files. These functions accomplish such tasks as browsing for files or folders, creating files
based on templates, closing documents, and getting information about recently opened files.
dom.cleanupXHTML()
Availability
Dreamweaver MX.
Description
This function is similar to the
convertToXHTML()
function, but it cleans up an existing XHTML
document. This function can run on a selection within the document. You can run the
cleanupXHTML()
function to clean up the syntax in an entire XHTML document or in the
current selection of a document.
Arguments
bWholeDoc
•
The
bWholeDoc
argument holds a Boolean value. If the value is
true
, the
cleanupXHTML()
function cleans up the entire document; otherwise, this function cleans up only the selection.
Returns
An array of six integers that quantify the number of the following elements:
•
XHTML errors that Dreamweaver fixed
•
The
map
elements that do not have an
id
attribute and cannot be fixed
•
The
script
elements that do not have a
type
attribute and cannot be fixed
•
The
style
elements that do not have a
type
attribute and cannot be fixed
•
The
img
elements that do not have an
alt
attribute and cannot be fixed
•
The
area
elements that do not have an
alt
attribute and cannot be fixed
dom.convertToXHTML()
Availability
Dreamweaver MX.
Description
Parses the HTML into a DOM tree, inserts missing items that are required for XHTML, cleans
up the tree, and then writes the tree as clean XHTML. The missing directives, declarations,
elements, and attributes that the
convertToXHTML()
function adds to the DOM tree, as
necessary, include the following items:
•
An XML directive
•
A
doctype
declaration
•
The
xmlns
attribute in the
html
element
•
A
head
section
000_DW_API_Print.book Page 252 Wednesday, August 20, 2003 9:14 AM
Summary of Contents for DREAMWEAVER MX 2004
Page 1: ...Dreamweaver API Reference...
Page 24: ...24 Contents...
Page 32: ......
Page 70: ...70 Chapter 5 Fireworks Integration...
Page 76: ...76 Chapter 6 Flash Integration...
Page 116: ...116 Chapter 9 The JavaBeans API...
Page 140: ......
Page 152: ...152 Chapter 11 Application...
Page 218: ...218 Chapter 12 Workspace...
Page 248: ...248 Chapter 13 Site...
Page 292: ...292 Chapter 14 Document...
Page 378: ...378 Chapter 17 Design...
Page 430: ...430 Chapter 18 Code...
Page 486: ...486 Index...