Project

Profile

Help

Node insert

Added by Anonymous over 18 years ago

Legacy ID: #3508855 Legacy Poster: bilbao6566545 (bilbao6566545)

Hi, maybe stupid question, but: How can i insert or add Node (NodeInfo) into another Node or DocumentInfo. I am using tiny tree implementation and cannot figure out how to do it. Thank you Bilba


Replies (2)

RE: Node insert - Added by Anonymous over 18 years ago

Legacy ID: #3508878 Legacy Poster: Michael Kay (mhkay)

You can't: the Saxon tree model is read-only (or rather, it's a two-phase model where you build the tree in its entirety and then have read-only access). Making it read-only means that operations that XPath/XSLT/XQuery depend on, notably sorting nodes into document order, can be vastly more efficient. However, there are implementations of the Saxon NodeInfo interface that run over updatable object models such as XOM (or JDOM or DOM). With such a model, you can get the underlying XOM node and update that. These implementations are less efficient than the native TinyTree implementation, but not impossibly so. Michael Kay

RE: Node insert - Added by Anonymous over 18 years ago

Legacy ID: #3508907 Legacy Poster: bilbao6566545 (bilbao6566545)

OK, i will do it in other DOM model as you sugest. thank you Bilba

    (1-2/2)

    Please register to reply