title: How do I remove namespaces from xml, using java dom?
body: <p>I have the following code</p>
  
  <pre><code>DocumentBuilderFactory dbFactory_ = DocumentBuilderFactory.newInstance();
  Document doc_;
  DocumentBuilder dBuilder = dbFactory_.newDocumentBuilder();
  StringReader reader = new StringReader(s);
  InputSource inputSource = new InputSource(reader);
  doc_ = dBuilder.parse(inputSource);
  doc_.getDocumentElement().normalize();
  </code></pre>
  
  <p>Then I can do </p>
  
  <pre><code>doc_.getDocumentElement();
  </code></pre>
  
  <p>and get my first element but the problem is instead of being <code>job</code> the element is <code>tns:job</code>.</p>
  
  <p>I know about and have tried to use:</p>
  
  <pre><code>dbFactory_.setNamespaceAware(true);
  </code></pre>
  
  <p>but that is just not what I'm looking for, I need something to completely get rid of namespaces.</p>
  
  <p>Any help would be appreciated,
  Thanks,</p>
  
  <p>Josh</p>