$result = "<QRYRESULT>
<ISSUCCESS>Y</ISSUCCESS>
<TRN_REF>2498297295729857927</TRN_REF>
<WARNING>IF ANY WARNING</WARNING>
</QRYRESULT>";
this is an XML string I am using. now I have to add a new node to this string (not a file). That is after adding the new node the XML string will look like the following. I am getting this XML string from another system in a variable so modifying the string manually is not an option.
$result = "<QRYRESULT>
<ISSUCCESS>Y</ISSUCCESS>
<TOKEN>some token</TOKEN>
<TRN_REF>2498297295729857927</TRN_REF>
<WARNING>IF ANY WARNING</WARNING>
</QRYRESULT>";
how can I do that ??