Hi all,
I m trying to make a java GUI that can insert,query,delete documents…insertion and deletion works fine but whenever i m trying to run query procedure as follow:
public static void performQueryAndListSerials(TXMLObjectAccessor accessor, TQuery query) throws TException {
Result_Frame rf = new Result_Frame();
rf.show(true);
String i;
try {
TResponse response = accessor.query( query );
TXMLObjectIterator iterator = response.getXMLObjectIterator();
rf.jLabel2.setText( "The query \"" + query + "\" returns " );
if (!iterator.hasNext()) {
rf.area.append( "no documents!" );
} else {
i = performCountQuery(accessor,query);
rf.jLabel1.setText( performCountQuery( accessor, query ) + " documents, which are:" );
//rf.jLabel4.setText(i);
}
}
}
catch (TQueryException queryException) {
showAccessFailure( queryException );
throw queryException;
}
}
// utility method to retrieve text of an element specified by its tag from a DOM tree
public static String getDOMElementTextByTagShow(Element element, String tagname) {
NodeList nl = element.getElementsByTagName(tagname);
Node n;
n = nl.item(0);
n = n.getFirstChild();
return n.getNodeValue();
}
according to the quoted area it should print the names and start time of the serials whenever the query runs…but unfortunately it just shows the number of serials n thats all…I m attaching the screen-shot with this…
thanks in advance,
Regards,
shuch