IXMLElement::get_typeIXMLElement::get_type*
*



Contents  *



Index  *Topic Contents
*Previous Topic: IXMLElement::get_children
*Next Topic: IXMLElement::get_text

IXMLElement::get_type

HRESULT IXMLElement::get_type(
    long *plType)

plType
Indirect pointer to return the type.

Each node of the tree is labeled as being one of the following types:

typedef  enum xmlelemTYPE {  
    XMLELEMTYPE_ELEMENT,
    XMLELEMTYPE_TEXT,
    XMLELEMTYPE_COMMENT,
<!--    XMLELEMTYPE_DOCUMENT,
    XMLELEMTYPE_DTD, -->
    XMLELEMTYPE_OTHER
} XMLELEM_TYPE;

For Internet Explorer 4.0, the interesting element types are XMLELEMTYPE_ELEMENT, XMLELEMTYPE_TEXT, and XMLELEMTYPE_COMMENT.

In the following example, both the CHANNEL and the TITLE elements are marked as being of type XMLELEMTYPE_ELEMENT. Their names are returned as "CHANNEL" and "TITLE", respectively. (The names are always all uppercase.) The TITLE element has one child, which is a text element marked as being of type XMLELEMTYPE_TEXT.

<CHANNEL>
    <title> Breaking News </title>
    <!-- This is a comment element-->
</CHANNEL>

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.