All I wanna do is parse the XML below and delete Peter and Sam as they
don't have any children

{code}
<Office  id="xyz" scope="node">
  <John>
    <age>23</age>
    <ssn>230231111</ssn>
  </John>
  <Peter>
  </Peter>
  <John>
    <age>25</age>
    <ssn>222222222</ssn>
  </John>
  <Sam>
  </Sam>
</Office>
{code}

-- 
Posted via http://www.ruby-forum.com/.