How to use vtkXdmf3Writer() to write vtkPolyData for multiple time steps?

I looked at the source code for vtkXdmf3Writer.cxx and it seems to support writing multiple time steps to the output XDMF file. I have a code that generates a polydata object at every time step. I want to write all the vtkPolyData objects to the same XDMF file with their corresponding time-step values.

  1. How can I associate a time-step value with a vtkPolyData? I saw that there is a static public function vtkDataObject::DATA_TIME_STEP() but I couldn’t figure out how to use it.
  2. How to pass the vtkPolyData objects for different time steps to the same vtkXdmf3Writer?