I'm not sure you're getting how XML / HTML is parsed. A div is ALWAYS an element, a div can have child nodes (eg other elements or text nodes)
Eg: <div /> is a div Element with no child nodes <div>Foo</div> is a div Element with a Text node as a child. Elements don't have a text property, but they can have text Nodes as children. On 22 July 2014 11:52, Davide Vecchi <d...@amc.dk> wrote: > Thanks, I had actually solved by using Element.text() that creates a Text > node, which matches your suggestion. I don't have the problem anymore, and > thanks for the assistance, despite me not doing a good job in explaining > myself. > > Just for clarity, my concern was only that I'm now replacing the original > Element node with a new Text node, while I would have preferred to replace > the original Element node with another Element node if it was possible. But > it's definitely not a serious limitation so no problem. > > What I get from Tapestry: > > <div id="parent"> <div> I'm the OLD child Element </div> </div> > > where both div-s are Element instances. > > I wondered if it was possible to turn that into > > <div id="parent"> <div> I'm the NEW child Element </div> </div> > > where both div-s are still Element instances, by creating the new child > div as an Element instance with different content. But if the new child div > is a Text instead, that's no problem, I just wanted to understand. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >