xml.openTag("Matrix");
for(int j=0; j < N; ++j) for(int i=0; i < N; ++i) txt << d.elem(i,j);
XMLWriter& operator<<(XMLWriter& xml, const PMatrix<T,N,C>& d){  xml.openTag("Matrix");  XMLWriterAPI::AttributeList alist;  for(int i=0; i < N; ++i)  {    for(int j=0; j < N; ++j)    {      alist.clear();      alist.push_back(XMLWriterAPI::Attribute("row", i));      alist.push_back(XMLWriterAPI::Attribute("col", j));      xml.openTag("elem", alist);      xml << d.elem(i,j);      xml.closeTag();    }  }  xml.closeTag(); // Matrix  return xml;}