If you paste MathML into a Wolfram System notebook, the Wolfram System will automatically try to convert it to Wolfram Language input. You can copy an expression from a notebook as MathML using the Copy As menu in the notebook front end.

Somewhat like Wolfram Language expressions, XML is a general format for representing data. The Wolfram Language automatically converts certain types of expressions to and from specific types of XML. MathML is one example. Another example is SVG for graphics.

If you ask the Wolfram Language to import a generic piece of XML, it will produce a SymbolicXML expression. Each XML element of the form <elemattr='val'>data</elem> is translated to a Wolfram Language SymbolicXML expression of the form XMLElement["elem",{"attr"->"val"},{data}]. Once you have imported a piece of XML as SymbolicXML, you can use the Wolfram Language's powerful symbolic programming capabilities to manipulate the expression you get. You can then use Export to export the result in XML form.

This generates a SymbolicXML expression, with an XMLElement representing the a element in the XML string.