title: How can I save and read from XML the new C++ style matrix objects in OpenCV?
body: <p>The old, C style cvMat matrices could be passed to the cvSave() function for easy writing to an XML file. The new C++ style <code>cv::Mat</code> and <code>cv::Mat_</code> matrices are not accepted by this function. </p>
  
  <p>The OpenCV reference has a section on XML persistence, but the three classes (FileStorage, FileNode and FileNodeIterator) lack any description or example and I can't figure out how to use them from the interface. </p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT</strong>: This actually concerns a lot of other functionality in the new <strong>C++</strong> interface of <strong>OpenCV</strong>, as of <strong>Version 2.1</strong>. The documentation is very poor in places, the function arguments are inconsistent, and the user group either has no idea, or has better things to do than answer questions. I'm going to stick to the old <strong>C</strong> interface for a while. The docs are tons better, not to mention the book by O'Reilly.</p>