How can I execute the following XQuery on an XML file using javax.xml.xpath?
for $com in //RepoStatistics/Commits/Commit
return
for $file in $com//File
return element tuple {
element path {
string($file/Path)
},
element action {
string($file/@action)
},
element date {
string($com/@date)
},
element developer {
string($com/@author)
},
element locAdd{
if (not(empty($file/LocAdd)))
then string($file/LocAdd)
else 0
},
element locRem{
if (not(empty($file/LocRem)))
then string($file/LocRem)
else 0
}
}
Excuse me if the question is stupid, but I am a very beginner.
javax.xml.xquerypackage.