\makeatletter
\newcommand{\listofexamples}{\@starttoc{xmp}}
\newcommand{\ecaption}[1]{\addcontentsline{xmp}{example}{#1}
\begin{centering}
\bf Example \thesection .\theexample : #1 \\[1cm]
\end{centering}
}
\newcommand{\l@example}[2]{\par\noindent#1 \dotfill {\itshape #2}}
\makeatother