Microsoft XML SDK 2.6 - XML Reference

IXMLDOMEntity::systemId Method

IXMLDOMEntity::get_systemId Method

Contains the system identifier.

Visual Basic Syntax

strValue = oXMLDOMEntity.systemId

C/C++ Syntax

HRESULT get_systemId(
    BSTR *systemID);

Parameters

systemID [out]
System identifier associated with the entity, if specified. If the system identifier is not specified, contains the empty string.

C/C++ Return Values

S_OK
Value returned if successful.
S_FALSE
Value returned when no system ID is specified.
E_INVALIDARG
Value returned if systemID is Null.

Example

IXMLDOMEntity *pIXMLDOMEntity = NULL;
VARIANT varName ;
HRESULT hr;

try
{
   // See help on IXMLDOMEntity::get_notationName method for definition of 
   // the GetFirstEntity() method.
   pIXMLDOMEntity = GetFirstEntity();

   if(pIXMLDOMEntity)
   {
      hr = pIXMLDOMEntity->get_systemId(&varName);
      if(SUCCEEDED(hr))
         ::MessageBox(NULL, _bstr_t(varName), _T("Public ID"), MB_OK);
      pIXMLDOMEntity->Release();
   }
}
catch(...)
{
   if(pIXMLDOMEntity)
      pIXMLDOMEntity->Release();
   DisplayErrorToUser();
}

See Also

IXMLDOMEntity Interface