Compartilhar via


ISAXContentHandler::startElement Method (Windows CE 5.0)

Send Feedback

This method receives notification of the beginning of an element.

HRESULT startElement(const wchar_t* pwchNamespaceUri,intcchNamespaceUri,const wchar_t* pwchLocalName,intcchLocalName,const wchar_t* pwchQName,intcchQName,ISAXAttributes* pAttributes);

Parameters

  • pwchNamespaceUri
    [in] Pointer to the name space URI.
  • cchNamespaceUri
    [in] Length for the name space URI.
  • pwchLocalName
    [in] Pointer to the local name string.
  • cchLocalName
    [in] Length of the local name.
  • pwchQName
    [in] Pointer to the qualified XML 1.0 name (QName) with prefix or, if QNames are not available, an empty string.
  • cchQName
    [in] Length of the QName.
  • pAttributes
    [in] Pointer to the attributes attached to the element.

Return Values

  • S_OK
    Returned if no errors occur.
  • E_FAIL
    Returned if the parse operation should be aborted.

Remarks

The reader invokes the startElement method at the beginning of every element in the XML document. A corresponding endElement method is called for every startElement event, even when the element is empty.

The startElement event allows up to three of the following name components for each element:

  • Name space URI
  • Local name
  • QName

Any or all of these name components may be specified, depending on the values of the "http://xml.org/sax/features/namespaces" and the "http://xml.org/sax/features/namespace-prefixes" features. The name space URI and local name are required when the "http://xml.org/sax/features/namespaces" feature is True (the default). These values are optional when this feature is set to False. Note that neither the URI nor local name value can be specified on its own. Both values are required if either is used.

The QName is required when the "http://xml.org/sax/features/namespaces-prefixes feature" is True and is optional when this feature is False (the default).

Note that the attribute list provided contains only attributes with explicit values (specified or default). The attribute list omits #IMPLIED attributes. Furthermore, the attribute list contains attributes used for name space declarations (xmlns* attributes) only if the "http://xml.org/sax/features/namespace-prefixes" feature is True. This feature is False by default.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.
Link Library: Uuid.lib.

See Also

endElement Method | ISAXContentHandler:IUnknown Interface

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.