ksh. want to remove particular block of line : below is the sample text in a file

AAA
ccc
ddd
eee
XXX
AAA
lll
mmm
eee
YYY

from the above text, I want to print only the line between AAA and XXX and final output will be like 

AAA
ccc
ddd
eee
XXX
thanks in advance
