{$this->name}
{$this->intervalLength}
{$this->intervalUnit}
{$this->startDate}
{$this->totalOccurrences}
{$this->trialOccurrences}
{$this->amount}
{$this->trialAmount}
{$this->creditCardCardNumber}
{$this->creditCardExpirationDate}
{$this->creditCardCardCode}
{$this->bankAccountAccountType}
{$this->bankAccountRoutingNumber}
{$this->bankAccountAccountNumber}
{$this->bankAccountNameOnAccount}
{$this->bankAccountEcheckType}
{$this->bankAccountBankName}
{$this->orderInvoiceNumber}
{$this->orderDescription}
{$this->customerId}
{$this->customerEmail}
{$this->customerPhoneNumber}
{$this->customerFaxNumber}
{$this->billToFirstName}
{$this->billToLastName}
{$this->billToCompany}
{$this->billToAddress}
{$this->billToCity}
{$this->billToState}
{$this->billToZip}
{$this->billToCountry}
{$this->shipToFirstName}
{$this->shipToLastName}
{$this->shipToCompany}
{$this->shipToAddress}
{$this->shipToCity}
{$this->shipToState}
{$this->shipToZip}
{$this->shipToCountry}
";
$xml_clean = "";
// Remove any blank child elements
foreach (preg_split("/(\r?\n)/", $xml) as $key => $line) {
if (!preg_match('/><\//', $line)) {
$xml_clean .= $line . "\n";
}
}
// Remove any blank parent elements
$element_removed = 1;
// Recursively repeat if a change is made
while ($element_removed) {
$element_removed = 0;
if (preg_match('/<[a-z]+>[\r?\n]+\s*<\/[a-z]+>/i', $xml_clean)) {
$xml_clean = preg_replace('/<[a-z]+>[\r?\n]+\s*<\/[a-z]+>/i', '', $xml_clean);
$element_removed = 1;
}
}
// Remove any blank lines
// $xml_clean = preg_replace('/\r\n[\s]+\r\n/','',$xml_clean);
return $xml_clean;
}
}