Hi

Got it working as expected. Try the following modified class

class customer {
        $name;
        $phone;

        function customer($name, $phone) {
                $this->name = $name;
                $this->phone = $phone;
        }

        function getName() {
                return $name;
        }

        function setName($name) {
                $this->name = $name;
        }

        function getPhone() {
                return $phone;
        }

        function setPhone($phone) {
                $this->phone = $phone;
        }

        function addXMLCustomer($dom) {
                $customer = $dom->createElement('customer');
                $customer->setAttribute('name', $this->name);
                $customer->setAttribute('phone', $this->phone);

                $dom->documentElement->appendChild($customer);
        }
}

HTH
--
Niel Archer



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to