Menu

#60 Can't add text nodes

open
5
2012-10-08
2001-10-07
Anonymous
No

I've created an element and now I would like to add a
text node to it, like <a>TEXT NODE</a> My code that
works in JAXP, IBM and ProjectX doesn't work in JTidy,
example below;

Node tx = xmldoc.createTextNode
(submitnode.getAttributes().getNamedItem
("value").getNodeValue());
subele.appendChild(tx); //bug, never works
with a Jtidy Document
newsub = parent.replaceChild(subele,
submitnode);

Discussion


Log in to post a comment.