W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: where in the DOM data structures is href stored?

From: Gary L Peskin <garyp@firstech.com>
Date: Sat, 11 Nov 2000 22:46:04 -0800
Message-ID: <3A0E3CAC.2598F138@firstech.com>
To: jtnews <jtnews@bellatlantic.net>
CC: html-tidy@w3.org
href is an attribute of the a element.  In the DOM model
an Attr is -not- a child of the element with which it is associated.  If
you have the Element for a, try getAttributes() which returns a
NamedNodeMap, or getAttribute() which returns a String with the
attribute value for a specified attribute, or getAttributeNode() which
returns an Attr node for the specified attribute.

The DOM specification referred to above explains all of this.  Check the
information under Node, Element, and Attr.


jtnews wrote:
> where in the DOM data structures is href stored?
> For example,
>   <a href="http://myurl.com">myurl</a>
> Where can I find "http://myurl.com" ?
> I find "a" listed as an element but I can't find
> an "href" node anywhere.
Received on Sunday, 12 November 2000 01:46:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:49 UTC