for (int index = 0; index < children.length; ++index)
for (int index = 0; index < numChildren; ++index)
    public Element positionToElement(int position)    {      // XXX: There is surely a better algorithm      // as beginning from first element each time.      for (int index = 0; index < children.length; ++index)        {	  Element elem = children[index];	  if ((elem.getStartOffset() <= position)	      && (position < elem.getEndOffset()))	    return elem;        }      return null;    }