One thing to watch out for: There may be more than one Text node in the
children, either because there are Elements between them, or because the
document used <![CDATA[]]> markup, or because the document is not in
normalized form (see the DOM spec for a discussion of that issue). You
should probably write your code so it will handle these situations, rather
than stopping at the first Text node as Alberto's code does.
There are lots of DOM tutorials on the web. Some of 'em are pretty good. It
might be worth investing some time in reading through a few of them, to get
a better sense of how to use the DOM most effectively and where the
pitfalls are. Of course the official DOM spec, and its FAQ document, are
available from the W3C's website -- a good starting point is
http://www.w3.org/DOM
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]