Get the data of the specified condition under the txt file

clipboard.png
if my condition is this date and time, and what I want is in xml format, and that, the value of type is the variable I passed in.
for example, how do I get this data when I want a type of 0 in 20181010 xml format?

Aug.10,2021

cat 
grep 
awk
Menu