Sorry, my previous posting worked only for the top node. Here the corrected version, which will work for any node:
XML
----
<?xml version="1.0"?>
<contacts>
<person>Adam</person>
<person>Eva</person>
<person>Thomas</person>
</contacts>
PHP
---
<?php
$xml = new DomDocument();
$xml->preserveWhitespace = false;
$xml->load('contacts.xml');
$xpath = new DOMXPath($xml);
$eva = $xpath->query('/contacts/person[.="Eva"]')->item(0);
$john = $xml->createElement('person', 'John');
$eva->parentNode->insertBefore($john, $eva->nextSibling);
header('Content-Type: text/plain');
print $xml->saveXML();
?>
Result
------
<?xml version="1.0"?>
<contacts>
<person>Adam</person>
<person>Eva</person><person>John</person>
<person>Thomas</person>
</contacts>