Getting the other nodes of an xml document after a specific

Hi, I am currently doing a search on xml documents stored in tamino. The search allows me to search based on the data in specific tags.
The problem is whenever i try to query tags like the , i get only that part that is queried. Is there any way to get the entire tag after a query on the data in a specific tag?

My xml document is attached below.
allprojects.xml (12.8 KB)

Hi,
Can you please post your query details.
Thanks
Bill

Hi, This is my function:
--------------------------------------------------

function processQuery()
{
var dbname = “http://localhost/tamino/aesdb/ino:etc”;
var QueryObj;
var QueryResult;
var itemSelected;
var zip;
var xqlResult;
var x = document.q1; //taken from a form
var QueryVal = x.strQuery.value.toString(); //should be a query like " //general/catalogentry/entry[langstring~=‘Logistics’]"
var pagesize = 12;

QueryObj = new TaminoClient(dbname,pagesize);
QueryResult = QueryObj.query(QueryVal);
xqlResult = QueryResult.getResult();
var nodeList = xqlResult.childNodes;
if (nodeList.length==0)
{
alert (“Search failed!!”);
}
else
{
alert("Search Successful!! ");
while (nodeList)
{
for (var i=0; i<nodeList.length; i++)
{
itemSelected = nodeList.item(i);
if (itemSelected!=null)
{
alert("Details 1: "+ itemSelected.getElementsByTagName(“identifier”).item(0).childNodes.item(0).data);
alert("Details 2: "+ itemSelected.getElementsByTagName(“catalog”).item(0).childNodes.item(0).data);
}
else
{
alert(“No items to display!!”);
};
};

QueryResult = QueryResult.getNext();
if (QueryResult)
{
xqlResult=QueryResult.getResult();
nodeList = xqlResult.childNodes();
}
else
{
nodeList = null;
};
};
};

QueryObj.endSession();
return(1);
};


--------------------------------------------------

The error i get is:

Error: Object required

I guess it means that

itemSelected.getElementsByTagName(“identifier”).item(0).childNodes.item(0).data

in the alert() does not return anything, coz my query only returns a small part of . Any idea how do I get the entire part of . I need it for display purposes…
Thx and rgds…

To get the whole ‘project’ instance you need to change the xpath query to something like:

//project[general/catalogentry/entry/langstring~=‘Logistics’]

so it returns ‘project’ instance(s) instead of ‘entry’ instances.