Edith Cohen, Haim Kaplan, Tova Milo

Research output: Contribution to journalArticlepeer-review


We consider online algorithms to label the nodes of an XML tree which is subject to insertions and deletions of nodes. The labeling is done such that (1) each node is assigned a label immediately when it is inserted and this label remains unchanged, and (2) from a pair of labels alone, one can decide whether one node is an ancestor of the other. This problem arises in the context of XML databases that support queries on the structure of the documents as well as on the changes made to the documents over time. We consider here the length of the assigned labels. We prove lower bounds on the length of labels which satisfy these requirements and provide labeling algorithms that match these bounds (up to a constant factor). We also consider the same problem when "clues" that provide guarantees on possible future insertions are given together with newly inserted nodes. Such clues can be derived from the DTD/XML Schema or from statistics on similar XML trees. We present algorithms that use the clues to assign shorter labels. We also prove that the length of our labels is close to the minimum possible.
Original languageEnglish
Pages (from-to)2048-2074
Number of pages27
JournalSIAM Journal on Computing
Issue number5
StatePublished - 1 Feb 2010


  • XML (Extensible Markup Language)
  • ELECTRONIC data processing
  • ONLINE algorithms
  • COMPUTER algorithms
  • MATHEMATICAL analysis
  • ancestor queries
  • labeling schemes
  • updates
  • XML


Dive into the research topics of 'LABELING DYNAMIC XML TREES'. Together they form a unique fingerprint.

Cite this