title: Test XML content without using mock mvc
body: <p>I am using spring test with mockmvc and it works like a charm to test xml output!</p>
  
  <p>Example:</p>
  
  <pre><code>ResultActions actions = this.mockMvc.perform(get("/entry/NX_P38398/overview.xml"));
  actions.andExpect(xpath("entry/overview/gene-name-list/gene-name[@type='recommended']").exists());
  actions.andExpect(xpath("entry/overview/gene-name-list/gene-name[@type='recommended']").string("BRCA1"));
  </code></pre>
  
  <p>I would like to take advantage of the same features to test an OutputStream without using mockmvc and controllers.
  Is it possible to use the same ResultMatcher?</p>
  
  <p>Example (pseudo code):</p>
  
  <pre><code>XMLContent xmlContent = new XMLContent("&lt;entry&gt;...&lt;/entry&gt;");
  AssertTrue(xmlContent.andExpect(xpath("entry/overview/gene-name-list/gene-name[@type='recommended']").exists());
  </code></pre>
  
  <p>I know it exists XMLUnit <a href="http://xmlunit.sourceforge.net/userguide/html/ar01s05.html" rel="nofollow">http://xmlunit.sourceforge.net/userguide/html/ar01s05.html</a> or other libraries, but I would like to re-use the same ResultMatcher.</p>
  
  <p>Thanks</p>