Hi, I am using PHP with Canada Post’s REST web service to get postage rates. Their PHP example code shows composing an XM request string using a strange <<<XML … XML; syntax that I have not seen before and can find no documentation about anywhere on the web. Does anyone know how this works and where the <<<XML … XML; syntax comes from? Thanks. Their code is as follows :
$xmlRequest =
<<<XML
<?xml version="1.0" encoding="UTF-8"?>
{$mailedBy}
<parcel-characteristics>
<weight>{$shipCarton->WeightKg}</weight>
</parcel-characteristics>
<origin-postal-code>{$originPostalCode}</origin-postal-code>
<destination>
<domestic>
<postal-code>
{$shipToAddress->PostalCode}
</postal-code>
</domestic>
</destination>
</mailing-scenario>
XML;