some XML parser implemented in PHP, using PHP's XML parser functions