Contains the notation name.
strValue = oXMLDOMEntity.notationName;
strValue = oXMLDOMEntity.notationName
HRESULT get_notationName( BSTR *name);
name
parameter is Null.BOOL DOMEntityNotationName() { BOOL bResult = FALSE; IXMLDOMEntity *pIXMLDOMEntity = NULL; BSTR bstrName ; HRESULT hr; try { pIXMLDOMEntity = GetFirstEntity(); if(pIXMLDOMEntity) { hr = pIXMLDOMEntity->get_notationName(&bstrName); ::MessageBox(NULL, bstrName, _T("Notation name"), MB_OK); bResult = TRUE; ::SysFreeString(bstrName); pIXMLDOMEntity->Release(); } } catch(...) { if(pIXMLDOMEntity) pIXMLDOMEntity->Release(); DisplayErrorToUser(); } return bResult; } IXMLDOMEntity* GetFirstEntity() { IXMLDOMNamedNodeMap *pIXMLDOMNamedNodeMapEntities = NULL; IXMLDOMEntity *pIXMLDOMEntity = NULL; IXMLDOMNode *pIXMLDOMNode = NULL; IXMLDOMDocument *pIXMLDOMDocument = 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_entities (&pIXMLDOMNamedNodeMapEntities); if(SUCCEEDED(hr) && pIXMLDOMNamedNodeMapEntities) { hr = pIXMLDOMNamedNodeMapEntities->nextNode(&pIXMLDOMNode); if(SUCCEEDED(hr) && pIXMLDOMNode) { hr = pIXMLDOMNode->QueryInterface(IID_IXMLDOMEntity, (void**)&pIXMLDOMEntity ); SUCCEEDED(m_hr) ? 0 : throw m_hr; pIXMLDOMNode->Release(); } pIXMLDOMNamedNodeMapEntities->Release(); } pIXMLDOMDocumentType->Release(); } } catch(...) { if(pIXMLDOMNode) pIXMLDOMNode->Release(); if(m_pIXMLDOMNamedNodeMapEntities) m_pIXMLDOMNamedNodeMapEntities->Release(); if(m_pIXMLDOMDocumentType) m_pIXMLDOMDocumentType->Release(); DisplayErrorToUser(); } // Release pIXMLDOMEntity when finished using it. // Release pIXMLDOMDocument when finished using it. return pIXMLDOMEntity; }
String. The property is read-only. For unparsed entities, the notationName
property contains the name of the notation for the entity (the name following NDATA). For parsed entities, it contains the empty string. Note that the name of the entity is available using the nodeName
property.
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button in the upper-left corner of the page.
Applies to: IXMLDOMEntity