Hi,
I’ve tried to get some results by performing a standard xquery to the database. Since the mentioned methods in the examples require either ino:docname or ino:id and I do not know them, I had to get the queryresults via a dataset. I did this:
public static XmlDocument GetXmlViaDataSet(string url, string collection, string queryString, string name) //Liest Ergebnisse eines querys in ein XMLDocument
{
TaminoDataAdapter adapter = new TaminoDataAdapter(url, collection);
adapter.Behavior = TaminoAdapterBehavior.ReadOnly;
DataSet ds = new DataSet(name);
string query2 = "input()" + queryString;
TaminoQuery tamQuery = new TaminoQuery(queryString);
int count = adapter.Fill(ds, tamQuery);
XmlDocument xdoc = new XmlDocument();
ds.WriteXml("c:/test.xml");
xdoc.LoadXml(ds.GetXml());
XmlDeclaration dec = xdoc.CreateXmlDeclaration("1.0", "utf-8","");
xdoc.InsertBefore((XmlNode)dec,(XmlNode)xdoc.DocumentElement);
return xdoc;
}
What I get is an xmldoucument, with all the results inside - just what I needed. I can perform a xslt Transformation with the result to show the XMLDocument as a HTML Table for example.
Problem is, that I want to have the ability to click on one of my results to edit them. But to do so, I’d need either the ino:id or the ino:documentname property of the element I want to edit…
But, since I got the result via query and the dataset, no such information is available, this means that I have no reference at all and so I can’t get the specific element for editing.
Is there a way to get the results via a query from tamino, maybe as single Taminodocument each, so that I can access the needed properties?
What I want is a method that returns each element as a Taminodocument,
with no more parameters than the ones given here:
public static TaminoDocument[] GetTaminoDocuments(string url, string collection, string queryString)
Is this possible?