private string ElementToXmlString(XmlElement element)
{
// TODO My goodness ECMA is complicated (see 10.2.1). We'll try this first.
XmlElement copy = (XmlElement)element.CloneNode(true);
if (prettyPrint)
{
BeautifyElement(copy, 0);
}
return ToString(copy);
}