public static void Main()
var xml = @"<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE math:math PUBLIC '-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN' 'math.dtd'>
<math:math xmlns:math='http://www.w3.org/1998/Math/MathML'>
<math:mo math:stretchy='false'>(</math:mo>
<math:mo math:stretchy='false'>+</math:mo>
<math:mo math:stretchy='false'>)</math:mo>
<math:annotation math:encoding='StarMath 5.0'>(a+b)^2</math:annotation>
var doc = XDocument.Parse(xml);
doc.DocumentType.Remove();
Console.WriteLine(doc.ToString());