title: Fatal Error - Unable to parse XML document with Java code
body: <p>I have an XML file which I want to parse(below). I used an example on mykong to learn - 
  <a href="http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/comment-page-2/#comment-125087" rel="nofollow">http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/comment-page-2/#comment-125087</a>
  But I got an error "[Fatal Error] flight.xml:3:15: Open quote is expected for attribute "{1}" associated with an  element type  "id"."</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;root xmlns:android="www.google.com"&gt;
  &lt;passenger id=001&gt;
  &lt;name&gt;Tom Cruise&lt;/name&gt;
  &lt;/passenger&gt;
  &lt;passenger id=002&gt;
  &lt;name&gt;Tom Hanks&lt;/name&gt;
  &lt;/passenger&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>I changed the print statements, but it does not work.</p>
  
  <pre><code>System.out.println("Passenger id : " + getTagValue("passenger id", eElement));
  System.out.println("Name : " + getTagValue("name", eElement));
  </code></pre>
  
  <p>How do I edit the code in mykong to make it work for me ?</p>
  
  <p><strong>Update -</strong>  I made the changes as mentioned below. But, now I don't see the passenger id's and names in my output. How do I fix that ?</p>
  
  <p>New XML File here - </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;root xmlns:android="www.google.com"&gt;
  
  &lt;passenger id="001"&gt;
  &lt;name&gt;Tom Cruise&lt;/name&gt;
  &lt;/passenger&gt;
  
  &lt;passenger id="002"&gt;
  &lt;name&gt;Tom Hanks&lt;/name&gt;
  &lt;/passenger&gt;
  
  &lt;/root&gt;
  </code></pre>