[bdbxml] XmlValue.getNodeValue() Problem

Ambar Mendez <[email protected]> Tue, 13 Sep 2005 15:57:51 +0000 (UTC)
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
Hi ...

I am trying to retrieve specific information by the combining and joining
results. So the query is something like this:

String query = "for $col in
collection('management.bdbxml')/collections/collection,\n";
query += "$alg in collection('management.bdbxml')/algorithms/algorithm,\n";
query += "$alp in collection('management.bdbxml')/alphas/alpha,\n";
query += "$algorithm in $alg[name=$col/associatedAlgorithm/algorithm],\n";
query += "$alpha in $alp[name=$alg/alpha]\n";
query += "where $col[name='col2']\n";
query += "return <collection id='{$col/name}'>";
query += "{$alg/extractor}";
query += "{$alp/descriptor}";
query += "</collection>";

To examine the results:
XmlResults results = managerQuery.execute(managerContext,0);
XmlValue value = results.next();
if(value != null){
 System.out.println("Display the result set. There is:");
 while(value != null){
  XmlValue extValue = value.getFirstChild();
  XmlValue desValue = value.getLastChild();
  String extractor = extValue.getNodeValue();
  String descriptor = desValue.getNodeValue();
  System.out.println("Extractor: "+extractor+" y descriptor: "+descriptor);
  
  value = results.next();
 }
}else{
 System.out.println("It's empty :'(");
}

But the method getNodeValue() returns nothing. nevertheless, when i test with
value.asString() or extValue.isNull() the node value exist.

I don't know, what's wrong?

Any help would be appreciated.



------------------------------------------
To remove yourself from this list, send an
email to [email protected]