Content v. attribute

Paul Prescod papresco at
Tue Oct 27 05:40:11 GMT 1998

Don Park wrote:
> String city = address.getAttribute("city")
> String street = address.getAttribute("street")
> or even simpler in ECMAScript:
> var city =
> var street = address.street
> In other words, why not treat attributes as a specific type of child
> element: unique and childless?

Your example elements being treated as a special kind of *attribute*.
(getAttribute(...)). But how do you "attribute-ize" a content model like


What does P.getAttribute( "B" ) return if there are three B s with four I
s between them?

 Paul Prescod  -

Marge: "It's almost as if Snake is killing from beyond the grave."
Lisa: "I warned you that capital punishment wouldn't be a deterrent."
	- The Simpson's halloween special: "Hell Toupee"

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list