subroutine pcdata_chunk(chunk)
use xmlf90_sax, only: build_data_array
character(len=*), intent(in) :: chunk
if (len_trim(chunk) == 0) RETURN ! skip empty chunk
if (in_data) then
!
! Note that we know where we need to put it through the pointer rp...
!
call build_data_array(chunk,rp%data,ndata)
else if (in_grid_data) then
!
! Fill the explicit grid data pointer
call build_data_array(chunk,gdata,ndata_grid)
else if (in_input_file) then
call safe_str_assign(ifp%buffer,ifp%buffer // chunk)
else if (in_header) then
!
! There should not be any pcdata in header in this version...
! print *, "Header data:"
! print *, trim(chunk)
endif
end subroutine pcdata_chunk