In the following I assume basic familiarity with both Lua\TeX's representation of math noads and MathML.
\subsection{Representation of XML elements}
In many places, \luamml\ passes around XML elements. Every element is represented by a Lua table.
Element \texttt 0 must always be present and is a string representing the tag name.
The positive integer elements of the table represent child elements (either strings for direct text content or nested tables for nested elements).
All string members which do not start with a colon are attributes, whose value is the result of applying \texttt{tostring} to the field value.
This implies that these values should almost always be strings, except that the value \texttt 0 (since it never needs a unit) can often be set as a number.
For example the XML document
\begin{verbatim}
<math block="display">
<mn>0</mn>
<mo> < </mo>
<mi mathvariant="normal">x</mi>
</math>
\end{verbatim}
would be represented by the Lua table
\begin{verbatim}
{[0] = "math", block="display",
{[0] = "mn", "0"},
{[0] = "mo", "<"},
{[0] = "mi", mathvariant="normal", "x"}
}
\end{verbatim}
\subsection{Expression cores}
MathML knows the concept of \enquote{embellished operators}:
\begin{blockquote}
The precise definition of an \enquote{embellished operator} is:
\item or one of the elements \xmltag{msub}, \xmltag{msup}, \xmltag{msubsup}, \xmltag{munder}, \xmltag{mover}, \xmltag{munderover}, \xmltag{mmultiscripts}, \xmltag{mfrac}, or \xmltag{semantics} (§ 5.1 Annotation Framework), whose first argument exists and is an embellished operator;
\item or one of the elements \xmltag{mstyle}, \xmltag{mphantom}, or \xmltag{mpadded}, such that an mrow containing the same arguments would be an embellished operator;
\item or an \xmltag{maction} element whose selected sub-expression exists and is an embellished operator;
\item or an \xmltag{mrow} whose arguments consist (in any order) of one embellished operator and zero or more space-like elements.
If and only if the element is a embellished operator the core is a \xmltag{mo} element representing the core of the embellished operator.
The core is a \xmltag{mi} or a \xmltag{mn} element if and only if the element would be an embellished operator with this core if this element where a \xmltag{mo} element.
A math lists can contain the following node types: noad, fence, fraction, radical, accent, style, choice, ins, mark, adjust, boundary, whatsit, penalty, disc, glue, and kern. The \enquote{noads}
(For \texttt{unicode-math}, this is usually just the character value. Legacy maths has to be remapped based on the family.)
Then there are two cases: The digits \texttt{0} to \texttt{9} are mapped to \xmltag{mn} elements, everything else becomes a \xmltag{mi} element with \texttt{mathvariant} set to \texttt{normal}.
(The \texttt{mathvariant} value might get suppressed if the character defaults to mathvariant \texttt{normal}.)
In either case, the \texttt{tex:family} attribute is set to the family number if it's not \texttt{0}.
The core is always set to the expression itself. E.g.\ the \texttt{math_char} kernel noad \verb+\fam3 a+ would become (assuming no remapping for this family)