qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qexo-general] node manipulation or substitution


From: Víctor Torres Padrosa
Subject: [Qexo-general] node manipulation or substitution
Date: Mon, 16 Feb 2004 17:58:29 +0100

Hi everybody,
 
Does anyone know if there are any functions to substitute a node in a xml file by a new one
when using XQuery and Java?
 
For example, given the following query:
 
String query="for $c in document(\"file:///.......\")//*:Statement";
String queryWhere="where (($c//*:grant/*:diReference/*:identifier/text()=\"identifier\") or ($c//*:digitalResource/*:address@hidden"uri\"]))";
String queryReturn="return $c//*:license";    
String squery=query+queryWhere+queryReturn;
 
XQuery xq=new XQuery();
Object result=new Object();   
result=xq.eval(squery); //eval returns an object of type Object
 

I would like to substitute all the nodes:
$c//*:digitalResource/*:address@hidden"uri"])
 
by:
$c//*:grant/*:diReference/*:identifier/text()="identifier"
 
Is it possible to change it by using any function or by manipulating the resulting Object in any way?
 

Thank you very much for your help
 
Víctor

reply via email to

[Prev in Thread] Current Thread [Next in Thread]