\startbuffer[doc]
<?xml version "1.0"?>
<document>
    <section title="First section">
        text
    </section>
    <section title="Second section">
        text
    </section>
</document>
\stopbuffer

\setuphead[section][expansion=yes]
\setuplist[section][alternative=command,
                    command=\SectionListCommand]

\define[3]\SectionListCommand{%
   {\bf#1\par
   title: #2\par
   usertitle: \structurelistuservariable{usertitle}}\par
   \blank
   \endgraf}

\startxmlsetups xml:name
    \xmlsetsetup{\xmldocument}{document|section}{xml:name:*}
\stopxmlsetups
\xmlregistersetup{xml:name}

\startxmlsetups xml:name:document
    \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:name:section
    \startsection[title=\xmlatt{#1}{title}]
                 [usertitle=\xmlatt{#1}{title}]
    \stopsection
\stopxmlsetups

\starttext
\placelist[section]
\xmlprocessbuffer{xml:name}{doc}{}
\stoptext
