title: SAXSource and org.w3c.dom.Document
body: <p>I have a <code>javax.xml.transform.sax.SAXSource</code> and I would like to get a <code>org.w3c.dom.Document</code> object. I have already googled around for hours but I got frustrated.</p>
  
  <p>Besides, the <code>InputSource</code> returned by <code>SAXSource#getInputSource()</code> is null and therefore I cannot use it to build the <code>org.w3c.dom.Document</code>.</p>
  
  <p>By the way, what I'm trying to achieve is to remove some xml elements from the xml contained in the SAXSource.</p>
  
  <p>Thank you for your help!</p>
  
  <p>Just some pieces of info about my environment: the SAXSource is returned to me by the <code>invoke</code> method of the following javax.xml.ws dispatcher:</p>
  
  <pre><code>Service service = Service.create(serviceName);         
  //...
  javax.xml.ws.Dispatch&lt;Source&gt; dispatcher = 
          service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
  </code></pre>