title: Java code for extraction of media information from XML
body: <p>I have the following XML.
  I need to create a java servelet that will extract the media information from this XML.
  How do i go about doing it. I am not interested in using any java libraries. Any manual way to do it without libraries?</p>
  
  <p>My XML is the following</p>
  
  <pre><code>&lt;result cover="http://ia.mediaimdb.com/images      
  /M/MV5BMjMyOTM4MDMxNV5BMl5BanBnXkFtZTcwNjIyNzExOA@@._V1._SX54_
  CR0,0,54,74_.jpg" title="The Amazing Spider-Man(2012)"year="2012"
  director="Marc Webb" rating="7.5"
  details="http://www.imdb.com/title/tt0948470"/&gt;
  
  &lt;result cover="http://ia.mediaimdb.
  com/images/M/MV5BMzk3MTE5MDU5NV5BMl5BanBnXkFtZTYwMjY3NTY3._V1._SX54_CR0,
  0,54,74_.jpg" title="Spider-Man(2002)" year="2002"director="Sam Raimi"
  rating="7.3" details="http://www.imdb.com/title/tt0145487"/&gt;
  
  &lt;result cover="http://ia.mediaimdb.
  com/images/M/MV5BODUwMDc5Mzc5M15BMl5BanBnXkFtZTcwNDgzOTY0MQ@@._V1._SX54_
  CR0,0,54,74_.jpg" title="Spider-Man 3 (2007)" year="2007" director="Sam
  Raimi" rating="6.3" details="http://www.imdb.com/title/tt0413300"/&gt;
  
  &lt;result cover="http://i.mediaimdb.
  com/images/SF1f0a42ee1aa08d477a576fbbf7562eed/realm/feature.gif" title="
  The Amazing Spider-Man 2 (2014)" year="2014" director="Sam Raimi"
  rating="6.3" details="http://www.imdb.com/title/tt1872181"/&gt;
  
  &lt;result cover="http://ia.mediaimdb.
  com/images/M/MV5BMjE1ODcyODYxMl5BMl5BanBnXkFtZTcwNjA1NDE3MQ@@._V1._SX54_
  CR0,0,54,74_.jpg" title="Spider-Man 2 (2004)" year="2004" director="Sam
  Raimi" rating="7.5" details="http://www.imdb.com/title/tt0316654"/&gt;
  &lt;/results&gt;
  </code></pre>