Closed 1nternerd closed 7 years ago
You could keep a reference to the node and modify it later:
var root = builder.create('mydoc');
var item = root.ele('observation-text');
item.text('text');
//
// later
//
item.text('more text concerning this observation');
Thanks @oozcitak that did the trick! 👍
Hey,
sorry to bother you, but I cant seem to find a way to get the text value of some already created node. im trying to append text in a parsing process, so it would be great to be able to just append or rewrite this one element.
my current situation:
lets say i find an observation block in a flatfile, i create the corresponding xml representation and it contains a tag like so:
after some lines in this flatfile, there might be the need to add text to this element:
is there a way to do this or would it be better if i cached all the text belonging to one observation and when im done i create the element?
thanks in advance!