title: Replace XML self-closing tag with empty one
body: <p>I have to compare XML data. There are two sources- </p>
  
  <ul>
  <li>Web Service</li>
  <li>XML files</li>
  </ul>
  
  <p>I don't see any easy way to transform them in same classes and use equals method.</p>
  
  <p>The classes that work with Web Services are auto generated and WSDL isn't simple at all.</p>
  
  <p>So I read the response from Web Service, read the corresponding file, transform them to String with the same formatting ( removed spaces, \n\r characters, and so on ) and then use String.equals() method.</p>
  
  <p>The issue is the Web services's empty tags are written next way :</p>
  
  <pre><code>&lt;EmptyTag/&gt;
  </code></pre>
  
  <p>but provided files contains this kind of empty tags:</p>
  
  <pre><code>&lt;EmptyTag&gt;&lt;/EmptyTag&gt;
  </code></pre>
  
  <p>OK, there is a way to prepare all provided files manually, but I don't like it.
  Who knows, how it's possible to transform empty tags to the same style ?
  If there are any ideas how to simplify to process - you are welcome ;)</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I don't parse the xml.
  The file's data is just read and transformed to expected format.
  The object's structure from Web Service's response is transformed to xml string in the next way: </p>
  
  <pre><code>    marshaller.marshal(new JAXBElement&lt;response_class_name&gt;(new QName("response_class_name"),
         response_class_name.class, response_object), stringWriter);
  </code></pre>