anchor.diff:    endif
   
     do !search the beginnig of the mark 'inside' 
  -    E_IO = read_record(buffer, cf=rf)
  +    E_IO = read_record(buffer, cf=rf); if(E_IO /= 0) exit
       buffer = trim(adjustlt(Upper_Case(buffer)))
       if (index(buffer, '<'//trim(adjustlt(Upper_Case(inside)))) > 0) exit !Mark 'inside' founded once
     enddo
   
  -  if(present(to_find)) then
  +  if(E_IO == 0 .and. present(to_find)) then
       n = 1; if(present(repeat)) n = repeat
       do !search 'repeat' times the mark 'to_find'
  -      E_IO = read_record(buffer, cf=rf)
  +      E_IO = read_record(buffer, cf=rf); if(E_IO /= 0) exit
         buffer = trim(adjustlt(Upper_Case(buffer)))
  -      if (index(buffer, '</'//trim(adjustlt(Upper_Case(inside)))) > 0) E_IO = -1
  +      if (index(buffer, '</'//trim(adjustlt(Upper_Case(inside)))) > 0) exit
         if (index(buffer, '<'//trim(adjustlt(Upper_Case(to_find)))) > 0) n = n - 1 !Mark 'to_find' founded once 
         if (n == 0) exit !Mark 'to_find' founded 'repeat' times
       enddo
  +    if (n > 0 ) E_IO = -1_I4P
     endif
     !---------------------------------------------------------------------------------------------------------------------------------
     end function move
  
positive.code:   endif
    pos = 1; if (present(from)) pos = from
    if(present(content)) content = ''
    E_IO = read_record(buffer, from=pos, cf=rf)
    do !search the beginnig of the mark 'inside' from position 'pos'
      buffer = trim(adjustlt(Upper_Case(buffer)))
      if (index(buffer, '<'//trim(adjustlt(Upper_Case(inside)))) > 0) exit !Mark 'inside' founded once
      E_IO = read_record(buffer)
      if(E_IO /= 0) return
    enddo
    do !search 'repeat' times the mark 'to_find'
      E_IO = read_record(buffer, cf=rf)
      buffer = trim(adjustlt(Upper_Case(buffer)))
      if (index(buffer, '</'//trim(adjustlt(Upper_Case(inside)))) > 0) then
        E_IO = -1_I4P ! Not found
        return
      endif
      if (index(buffer, '<'//trim(adjustlt(Upper_Case(to_find)))) > 0) then
        if (len_trim(of_value) == 0) exit !there is no attribute value to seach
        call get_char(buffer, with_attribute, strng, E_IO=E_IO)
        if (E_IO==0 .and. trim(adjustlt(Upper_Case(strng))) == trim(adjustlt(Upper_Case(of_value)))) then  !Attribute match the value
          if (index(buffer, '/>') == 0 .and. index(buffer, '</'//trim(adjustlt(Upper_Case(to_find)))) == 0) then
            do
              E_IO = read_record(strng, cf=rf)
              if (index(trim(adjustlt(Upper_Case(strng))), '</'//trim(adjustlt(Upper_Case(to_find)))) > 0) exit
              content = content//strng
            enddo
          endif
          exit
        endif
      end if
    enddo
    !---------------------------------------------------------------------------------------------------------------------------------
    end function
  
  
negative.code:   !< search: search in VTK file from position 'pos' inside the mark 'inside', until find the mark 'to_find', eventually, having 
    !< attribute 'with_attribute' matching the value 'of_value'
    !---------------------------------------------------------------------------------------------------------------------------------
    integer(I4P),     optional,    intent(IN)    :: from           !< Offset. Start point
    character(len=*),              intent(IN)    :: inside         !< XML element where to search 'to_find'
    character(len=*),              intent(IN)    :: to_find        !< Searched XML element
    character(len=*),              intent(IN)    :: with_attribute !< XML attribute id
    character(len=*),              intent(IN)    :: of_value       !< Attribute value
    integer(I4P),     optional,    intent(IN)    :: cf             !< Current file index (for concurrent files IO).
    character(len=:), allocatable, intent(INOUT) :: buffer         !< String 
    character(len=:), allocatable, intent(OUT), optional :: content!< String with the content inside 'to_find' element
    integer(I4P)                                 :: rf             !< Real file index
    integer(I4P)                                 :: E_IO           !< Input/Output inquiring flag: $0$ if IO is done, $> 0$ if IO is not done
    character(len=:), allocatable                :: strng
    integer(I4P)                                 :: pos
    !---------------------------------------------------------------------------------------------------------------------------------
  