return (XPath[])pathObjs.toArray(new XPath[pathObjs.size()]);
}
protected Field parseField( String xpath ) {
final Vector pathObjs = new Vector();
Field field = new Field();
// split to A|B|C
StringTokenizer paths = new StringTokenizer(xpath,"|");
while(paths.hasMoreTokens()) {
XPath pathObj = new XPath();
pathObjs.add(pathObj);
if(!parsePath(pathObj,paths.nextToken(),true))
return new Field(); // recover by retuning a dummy field.
}
field.paths = (XPath[])pathObjs.toArray(new XPath[pathObjs.size()]);
return field;
}