elementDecl Method

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SAX2 Reference

elementDecl Method

Receives/reports an element type declaration. The content model consists of one of the following:

  • The string "EMPTY"
  • The string "ANY"
  • A group of values in parentheses. This group is optionally followed by an occurrence indicator (for example, <!ELEMENT DOCUMENT (TITLE,AUTHOR+,SUMMARY*,NOTE?)>).

The content model is normalized so that all parameter entities are fully resolved, all white space is removed, and enclosing parentheses are included. Other normalization (such as removing redundant parentheses or simplifying occurrence indicators) depends on the parser.

[Visual Basic]

Implementation Syntax

Sub elementDecl(strName As String, strModel As String)

Parameters

strName
The element type name.
strModel
The content model as a normalized string.

Return Values

If failed, the DeclHandler raises a trappable error.

[C/C++]

Syntax

HRESULT elementDecl(
   [in] const wchar_t * pwchName,
   [in] int cchName,
   [in] const wchar_t * pwchModel,
   [in] int cchModel);

Parameters

pwchName [in]
The element type name.
cchName [in]
The length of the element type name.
pwchModel [in]
The content model as a normalized string.
cchModel [in]
The length of the content model normalized string.

Return Values

S_OK
The value returned if no errors are returned.
E_FAIL
The value returned if the parse operation should be aborted.

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

attributeDecl Method

Applies to: ISAXDeclHandler/IVBSAXDeclHandler Interface