private void StoreCurrentNode(string xml, int lineNumber, int linePosition)
 {
     try
     {
         _repository.LoadXml(xml, _activeDocument.AbsolutePath);
         var rootElement       = _repository.GetRootElement();
         var selectedElement   = _repository.GetElement(rootElement, lineNumber, linePosition);
         var selectedAttribute = _repository.GetAttribute(selectedElement, lineNumber, linePosition);
         _repository.SetSelected((XObject)selectedAttribute ?? selectedElement);
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.ToString());
     }
 }