Re: Problem with DOM

Niel Archer <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.