\startxmlsetups xml:mysetups
    \xmlsetsetup{#1}{
        root|
        something
    } {xml:*}
\stopxmlsetups

\xmlregistersetup{xml:mysetups}

\startxmlsetups xml:root
    \placelist[section][criterium=text]
    \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:something
    \section{\xmlflush{#1}}
    \xmldoifelse {#1} {.[contains(text(),'2')]}
        {!!!}
        {???}
\stopxmlsetups

\starttext
    \startluacode
        local x = xml.load("entities-004.xml", {
            utfize_entities = true,
            unify_predefined_entities = true,
        } )
        print(x)
    \stopluacode

    \xmlprocessfile{}{entities-004.xml}{}
\stoptext
