title: Deserialize Document type to a Java Class
body: <p>Is it possible to deserialize a "org.w3c.dom.Document" type into a Java class?
  We have this class (Employee), and we have an existing method in our application that calls a web service and returns a "Document" type of the Employee class. Can we serialize the Document to Employee class?  </p>
  
  <p>Can you please show some example? Most of the sample I found from the internet reads an XML file in a directory then deserialize it to the class. But in our scenario, the object is a Document type.  </p>
  
  <p>What I'm trying to achieve is something like as below (pseudocode):</p>
  
  <pre><code>String employeeID = "12344444";
  org.w3c.dom.Document xmlEmployee = helperClass.callWebServiceEmployee(employeeID);
  
  EmployeeClass employee = new EmployeeClass();
  
  employee = (EmployeeClass)xmlEmployee. 
  </code></pre>