public function parseAddress($xml) {
        $r = array();
        $r['Name'] = (string)$xml->Name;
        $r['Line1'] = (string)$xml->Line1;
        if (isset($xml->Line2)){
            $r['Line2'] = (string)$xml->Line2;
        }
        if (isset($xml->Line3)){
            $r['Line3'] = (string)$xml->Line3;
        }
        if (isset($xml->DistrictOrCounty)){
            $r['DistrictOrCounty'] = (string)$xml->DistrictOrCounty;
        }
        $r['City'] = (string)$xml->City;
        $r['StateOrProvinceCode'] = (string)$xml->StateOrProvinceCode;
        $r['CountryCode'] = (string)$xml->CountryCode;
        if (isset($xml->PostalCode)){
            $r['PostalCode'] = (string)$xml->PostalCode;
        }
        if (isset($xml->PhoneNumber)){
            $r['PhoneNumber'] = (string)$xml->PhoneNumber;
        }
        return $r;
    }