anchor.diff:      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 ! Not found
  +      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)
  -      if (trim(adjustlt(Upper_Case(strng))) == trim(adjustlt(Upper_Case(of_value)))) exit !Attribute match the value
  +      call get_char(buffer, with_attribute, strng, E_IO=E_IO)
  +      if (trim(adjustlt(Upper_Case(strng))) == trim(adjustlt(Upper_Case(of_value)))) then  !Attribute match the value
  +        if (present(content) .and. index(buffer, '/>') == 0 .and. &
  +          index(buffer, '</'//trim(adjustlt(Upper_Case(to_find)))) == 0) then
  +          content=''
  +          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
     !---------------------------------------------------------------------------------------------------------------------------------
  
positive.code: 
  !-----------------------------------------------------------------------------------------------------------------------------------
    function VTK_INI_XML_READ(input_format,filename,mesh_topology,npieces,nx1,nx2,ny1,ny2,nz1,nz2,cf) result(E_IO)
  !  function VTK_INI_XML(output_format,filename,mesh_topology,cf,nx1,nx2,ny1,ny2,nz1,nz2) result(E_IO)
    !---------------------------------------------------------------------------------------------------------------------------------
    !< Procedure for initializing VTK-XML file when reading.
    !<
  
negative.code:   f = rf
    if (present(cf)) cf = rf
    vtk(rf)%topology = trim(mesh_topology)
  
    select case(trim(Upper_Case(input_format)))
    case('ASCII')
      vtk(rf)%f = ascii
  ! Not implemented
  
    case('BINARY')
      vtk(rf)%f = binary
  ! Not implemented
  !    select case(trim(vtk(rf)%topology))
  !      case('RectilinearGrid', 'StructuredGrid', 'UnstructuredGrid')
  !
  !        open(unit=Get_Unit(vtk(rf)%u),file=trim(filename),status='old', &
  !             form='UNFORMATTED',access='STREAM',action='READ', &
  !             iostat=E_IO, position='REWIND')
  !
  !        select case(trim(vtk(rf)%topology))
  !          case('RectilinearGrid', 'StructuredGrid')
  !            ! Get WholeExtent
  !            E_IO = move(inside='VTKFile', to_find=trim(vtk(rf)%topology), repeat=1, cf=rf,buffer=s_buffer)
  !            call get_char(buffer=s_buffer, attrib='WholeExtent', val=aux, E_IO=E_IO)
  !            if(E_IO == 0) then
  !              read(aux,*) rn
  !              if(present(nx1)) nx1 = rn(1)
  !              if(present(nx2)) nx2 = rn(2)
  !              if(present(ny1)) ny1 = rn(3)
  !              if(present(ny2)) ny2 = rn(4)
  !              if(present(nz1)) nz1 = rn(5)
  !              if(present(nz2)) nz2 = rn(6)
  !            endif
  !        end select
  !
  !        ! count the pieces
  !        rewind(unit=vtk(rf)%u, iostat=E_IO)
  !        np = 0
  !        do
  !          E_IO = read_record(s_buffer, cf=rf)
  !          s_buffer = trim(adjustl(Upper_Case(s_buffer)))
  !          if (index(s_buffer, '</'//trim(Upper_Case(vtk(rf)%topology))) > 0) exit !end of ASCII header section found
  !          if (index(s_buffer, '<PIECE') > 0) np = np + 1
  !        enddo
  !
  !    end select
  
    case('RAW')
      vtk(rf)%f = raw
      select case(trim(vtk(rf)%topology))
        case('RectilinearGrid', 'StructuredGrid', 'UnstructuredGrid')
  
          open(unit=Get_Unit(vtk(rf)%u),file=trim(filename),status='old', &
               form='UNFORMATTED',access='STREAM',action='READ', &
               iostat=E_IO, position='REWIND')
  
          select case(trim(vtk(rf)%topology))
            case('RectilinearGrid', 'StructuredGrid')
              ! Get WholeExtent
              E_IO = move(inside='VTKFile', to_find=trim(vtk(rf)%topology), repeat=1, cf=rf,buffer=s_buffer)
              call get_char(buffer=s_buffer, attrib='WholeExtent', val=aux, E_IO=E_IO)
              if(E_IO == 0) then
                read(aux,*) rn
                if(present(nx1)) nx1 = rn(1)
                if(present(nx2)) nx2 = rn(2)
                if(present(ny1)) ny1 = rn(3)
                if(present(ny2)) ny2 = rn(4)
                if(present(nz1)) nz1 = rn(5)
                if(present(nz2)) nz2 = rn(6)
              endif
          end select
  
          ! count the pieces
          rewind(unit=vtk(rf)%u, iostat=E_IO)
          np = 0
          do
            E_IO = read_record(s_buffer, cf=rf)
            s_buffer = trim(adjustl(Upper_Case(s_buffer)))
            if (index(s_buffer, '</'//trim(Upper_Case(vtk(rf)%topology))) > 0) exit !end of ASCII header section found
            if (index(s_buffer, '<PIECE') > 0) np = np + 1
          enddo
  
        ! calculate the offset to reach the appended data
          rewind(unit=vtk(rf)%u, iostat=E_IO)
          read(unit=vtk(rf)%u,iostat=E_IO) c1
          do 
            read(unit=vtk(rf)%u,iostat=E_IO) c2
            if (iachar(c1)==10 .and. c2 =='_') exit
            c1 = c2
          enddo
          inquire(unit=vtk(rf)%u, pos=vtk(rf)%ioffset)
  
      end select
    end select  
    if(present(npieces)) npieces = np
    end function VTK_INI_XML_READ
  
  
    function VTK_GEO_XML_UNST_R4_READ(NN,NC,X,Y,Z,npiece,cf) result(E_IO)
    !---------------------------------------------------------------------------------------------------------------------------------
    !< Function for reading mesh with \b UnstructuredGrid topology (R8P).
    !---------------------------------------------------------------------------------------------------------------------------------
    integer(I4P),           intent(OUT) :: NN       !< number of nodes
    integer(I4P),           intent(OUT) :: NC       !< number of cells
    real(R4P), allocatable, intent(OUT) :: X(:)     !< x coordinates
    real(R4P), allocatable, intent(OUT) :: Y(:)     !< y coordinates
    real(R4P), allocatable, intent(OUT) :: Z(:)     !< z coordinates
    integer(I4P), optional, intent(IN)  :: npiece   !< Number of the piece to read (by default: 1)
    integer(I4P), optional, intent(IN)  :: cf       !< Current file index (for concurrent files IO).
    integer(I4P)                        :: E_IO     !< Input/Output inquiring flag: $0$ if IO is done, $> 0$ if IO is not done
    integer(I4P)                        :: rf       !< Real file index.
    character(len=:),allocatable        :: s_buffer !< Buffer string.
    character(len=:), allocatable       :: fmt
    character(len=:), allocatable       :: bindata
    integer(I4P)                        :: np, i, offs, N_Byte
    !---------------------------------------------------------------------------------------------------------------------------------
  
    !---------------------------------------------------------------------------------------------------------------------------------
    rf = f
    if (present(cf)) then
      rf = cf ; f = cf
    endif
    np = 1_I4P; if (present(npiece)) np = npiece
    E_IO = -1_I4P
    select case(vtk(rf)%f)         
  
      case(ascii)
  ! not implemented
  
      case(binary)
  ! not implemented
  !      rewind(unit=vtk(rf)%u, iostat=E_IO)
  !      E_IO = move(inside='UnstructuredGrid', to_find='Piece', repeat=np, cf=rf, buffer=s_buffer) ! find the 'np' piece
  !      call get_int(buffer=s_buffer, attrib='NumberOfPoints', val=NN, E_IO=E_IO)
  !      if(E_IO == 0) then
  !        allocate(X(NN), Y(NN), Z(NN), stat=E_IO)
  !        call get_int(buffer=s_buffer, attrib='NumberOfCells', val=NC, E_IO=E_IO)
  !        E_IO = search(inside='Points', to_find='DataArray', with_attribute='Name', of_value='Points', buffer=s_buffer,content=bindata)
  !        call get_int(buffer=s_buffer,  attrib='offset', val=offs, E_IO=E_IO)
  !        call get_char(buffer=s_buffer, attrib='format', val=fmt,  E_IO=E_IO)
  !        if (trim(adjustlt(Upper_Case(fmt)))/='BINARY') then
  !          E_IO = -1_I4P !stop 'Format not implemented'
  !        else
  !          read(bindata, iostat=E_IO) N_Byte, (X(i), Y(i), Z(i), i=1,NN) !get appended array
  
  
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  ! How to do the opposite?
  !    allocate(XYZa(1:3*NN))
  !    do n1 = 1,NN
  !      XYZa(1+(n1-1)*3:1+(n1-1)*3+2)=[X(n1),Y(n1),Z(n1)]
  !    enddo
  !    call pack_data(a1=[int(3*NN*BYR8P,I4P)],a2=XYZa,packed=XYZp) ; deallocate(XYZa)
  !    call b64_encode(n=XYZp,code=XYZ64) ; deallocate(XYZp)
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  
   !       endif
  !      endif
  
      case(raw)
  
        rewind(unit=vtk(rf)%u, iostat=E_IO)
        E_IO = move(inside='UnstructuredGrid', to_find='Piece', repeat=np, cf=rf, buffer=s_buffer) ! find the 'np' piece
        call get_int(buffer=s_buffer, attrib='NumberOfPoints', val=NN, E_IO=E_IO)
        if(E_IO == 0) then
          allocate(X(NN), Y(NN), Z(NN), stat=E_IO)
          call get_int(buffer=s_buffer, attrib='NumberOfCells', val=NC, E_IO=E_IO)
          E_IO = search(inside='Points', to_find='DataArray', with_attribute='Name', of_value='Points', buffer=s_buffer)
          call get_int(buffer=s_buffer,  attrib='offset', val=offs, E_IO=E_IO)
          call get_char(buffer=s_buffer, attrib='format', val=fmt,  E_IO=E_IO)
          if (trim(adjustlt(Upper_Case(fmt)))/='APPENDED') then
            E_IO = -1_I4P 
          else
            read(unit=vtk(rf)%u, iostat=E_IO, pos = vtk(rf)%ioffset+offs) N_Byte, (X(i), Y(i), Z(i), i=1,NN) !get appended array
          endif
        endif
      end select
    !---------------------------------------------------------------------------------------------------------------------------------
    end function
  
  
    function VTK_END_XML_READ(cf) result(E_IO)
    !---------------------------------------------------------------------------------------------------------------------------------
  