private void build(){
  int count=names.size();
  int last=count - 1;
  for (int i=0; i < count; i++) {
    String prefix=prefixes.get(i);
    String segment=names.get(i);
    int index=indexes.get(i);
    if (i > 0) {
      builder.append('/');
    }
    if (attribute && i == last) {
      builder.append('@');
      builder.append(segment);
    }
 else {
      if (prefix != null) {
        builder.append(prefix);
        builder.append(':');
      }
      builder.append(segment);
      builder.append('[');
      builder.append(index);
      builder.append(']');
    }
  }
  location=builder.toString();
}

private void build ( ) { int count = names . size ( ) ; int last = count - 1 ; for ( int i = 0 ; i < count ; i ++ ) { String prefix = prefixes . get ( i ) ; String segment = names . get ( i ) ; int index = indexes . get ( i ) ; if ( i > 0 ) { builder . append ( '/' ) ; } if ( attribute && i == last ) { builder . append ( '@' ) ; builder . append ( segment ) ; } else { if ( prefix != null ) { builder . append ( prefix ) ; builder . append ( ':' ) ; } builder . append ( segment ) ; builder . append ( '[' ) ; builder . append ( index ) ; builder . append ( ']' ) ; } } location = builder . toString ( ) ; }
this method is used to build a fully qualified path that has each segment index . building a path in this manner ensures that a parsed path can have a unique string that identifies the exact xml element the expression points to .
