[Xerte] Re: set text in node

Julian Tenney Julian.Tenney at nottingham.ac.uk
Tue Jan 18 17:26:36 GMT 2011


Intuitively:

icon.nextSibling.firstChild.nodeValue = "hello";

The first child is in fact the thing between the tags. Might not look like a child to us, but apparently it is. If it were <![CDATA[ it would be more intuitive I guess - it looks like the node actually has a child in there,

J

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 18 January 2011 17:23
To: Xerte discussion list
Subject: [Xerte] Re: set text in node

Icon.nextSibling = "ta da"

?

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 18 January 2011 17:12
To: Xerte list
Subject: [Xerte] set text in node


Ok, I can do this of course:

icon.nextSibling.attributes.x = 200;

How about text?

I've tried a few variations on these values:
icon.nextSibling.nodeValue
CDATA
etc.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110118/df5e419d/attachment.html>


More information about the Xerte mailing list