return txt;
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(); return xml;
TextWriter& operator<<(TextWriter& txt, const PMatrix<T,N,C>& d){  for(int j=0; j < N; ++j)    for(int i=0; i < N; ++i)      txt << d.elem(i,j);  return txt;}