Example #1
0
 ///
 ///	 <summary> * Get the target with ID=<code>strID</code>
 ///	 *  </summary>
 ///	 * <param name="strID"> the id of the target to search </param>
 ///	 * <returns> KElement target the target element </returns>
 ///
 public virtual KElement getTarget(string strID)
 {
     // m_mapTarget=null; // uncomment this to ensure that the cache is off
     if (useIDCache && m_mapTarget != null && strID != null)
     {
         KElement elem = (KElement)m_mapTarget[strID];
         if (elem != null)
         {
             XmlAttribute a = elem.GetAttributeNode(AttributeName.ID);
             if (a != null && strID.Equals(a.Value))
             {
                 return(elem);
             }
             m_mapTarget.Remove(strID);
             // oops this guy is inconsistent - zapp it
         }
     }
     return(null);
 }