Wrote this a while ago while learning XML Parsing in Java