$re = '/(<Attribute.*?>)(.*?)(<\/Attribute>)/';
$str = '<?xml version="1.0" encoding="UTF-8"?>
-<feed xmlns="http://www.ixtens.com/xml/mbapi/R1.4">
-<Header>
<DocumentGUID>50d24cd3-8b36edc5-1be5</DocumentGUID>
<DocumentCreationDate>2014-06-11T08:56:11.333-05:00</DocumentCreationDate>
<SenderID>515</SenderID>
<SenderName>Maverick</SenderName>
<SourceChannelID>Ssense</SourceChannelID>
<ReceiverID>5115</ReceiverID>
<DestinationChannelID>store</DestinationChannelID>
</Header>
-<NewProductAuthorization>
<Attribute name="SupplierName" domain="CommonTaxonomy">Red</Attribute>';
$subst = "\1<value>\2</value>\3";
$result = preg_replace($re, $subst, $str, 1);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php