Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method receives the beginning of a document type declaration. If the document has no such declaration, this method will not be invoked.

Syntax

HRESULT startDTD(
  const wchar_t* 
pwchName,
  int cchName,
  const wchar_t* 
pwchPublicId,
  int 
cchPublicId,
  const wchar_t* 
pwchSystemId,
  int 
cchSystemId
);

Parameters

pwchName

[in] Pointer to the document type name.

cchName

[in] Length of the document type's name.

pwchPublicId

[in] Pointer to the declared public identifier for the external DTD subset or NULL (if none was declared).

cchPublicId

[in] Length of the public identifier.

pwchSystemId

[in] Pointer to the declared system identifier for the external DTD subset or NULL (if none was declared).

cchSystemId

[in] Length of the system identifier.

Return Value

S_OK

Returned if no errors occur.

E_FAIL

Returned if the parse operation should be aborted.

Remarks

Any declarations are assumed to be in the internal subset unless otherwise indicated by a startEntityevent.

The startDTDmethod is called within the startDocumentand endDocumentevents from the content handler and before the first startElementevent.

A document type declaration connects a document to its document type definition (DTD), which defines the rules of the document, such as what tags can go in your document, what tags can contain other tags, and the number and sequence of the tags. This declaration always begins with "<!DOCTYPE", followed by the name of the DTD, followed by a declaration of the DTD or a link to where the DTD can be found. Finally, it ends with a ">" to close the declaration as shown in the following code sample.

Copy Code
<!DOCTYPE NAME [
DTD content goes here.
]>

Requirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also