Microsoft XML SDK 2.6 - XML Reference

IXMLDOMDocumentType::notations Method

IXMLDOMDocumentType::get_notations Method

Contains a list of the notations present in the document type declaration.

Visual Basic Syntax

Set objXMLDOMNamedNodeMap = oXMLDOMDocumentType.notations

C/C++ Syntax

HRESULT get_notations(
    IXMLDOMNamedNodeMap **notationMap);

Parameters

notationMap [out]
List of the XMLDOMNotation objects present in this document type declaration.

C/C++ Return Values

S_OK
Value returned if successful.
E_INVALIDARG
Value returned if notationMap is Null.

Remarks

Notations identify by name the format of unparsed entities, the format of elements that bear a notation attribute, or the application to which a processing instruction is addressed.

Example

BOOL DOMDocTypeprops()
{
   BOOL bResult = FALSE;
   IXMLDOMDocument *pIXMLDOMDocument = NULL;
   IXMLDOMDocumentType *pIXMLDOMDocumentType = NULL;
   IXMLDOMNamedNodeMap *pIXMLDOMNamedNodeMapNotations = NULL;
   HRESULT hr;

   try
   {
      // Create an instance of DOMDocument and initialize 
      // pIXMLDOMDocument.
      // Load/create an XML fragment.
      hr = pIXMLDOMDocument->get_doctype(&pIXMLDOMDocumentType);
      SUCCEEDED(hr) ? 0 : throw hr;

      if(pIXMLDOMDocumentType)
      {
         hr = pIXMLDOMDocumentType->get_notations 
            (&pIXMLDOMNamedNodeMapNotations);
         if(pIXMLDOMNamedNodeMapNotations)
         {
         // DisplayMapEntries(pIXMLDOMNamedNodeMapNotations)
            bResult = TRUE;
            pIXMLDOMNamedNodeMapNotations->Release();
         }
         pIXMLDOMDocumentType->Release();
      }
   }
   catch(...)
   {
      if(pIXMLDOMDocumentType)
         pIXMLDOMDocumentType->Release();
      if(pIXMLDOMNamedNodeMapNotations)
         pIXMLDOMNamedNodeMapNotations->Release();
      DisplayErrorToUser();
   }
   return bResult;
}

See Also

IXMLDOMDocumentType Interface