title: Java : Getting the next child node with SAXParser
body: <p>I have the following XML structure :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;root&gt;
      &lt;person name="foobar"&gt;
          &lt;age&gt;45&lt;/age&gt;
          &lt;city&gt;SOTown&lt;/city&gt;
      &lt;/person&gt;
      &lt;person name="tester"&gt;
          &lt;age&gt;51&lt;/age&gt;
          &lt;city&gt;There&lt;/city&gt;
      &lt;/person&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>I'm using SAXParser and I can get the node elements like this (it's simplified) :</p>
  
  <pre><code>ArrayList&lt;Person&gt; persons = new ArrayList&lt;Person&gt;();
  public void startElement(String uri, String localName,String qName, 
                  Attributes attributes) throws SAXException {
  if (name.equals("person")){
  Person p = new Person();
  p.name = attributes.getValue("name");
  p.age = ???
  p.city = ???
  }
  
  public void endElement(String uri, String localName,
          String qName) throws SAXException {
  
  }
  </code></pre>
  
  <p>The problem is at the <code>p.age</code> and <code>p.city</code> lines.</p>
  
  <p>How can I get that child nodes values ?</p>
  
  <p>Thank you.</p>