This document describes the class TaminoResult
of the JScript API.
Name | errorNo |
---|---|
Example |
var tamResult = tamClient.query("Telephone[Firstname='Bill']"); if (!tamResult.errorNo) { // if no error ...} |
Description |
This delivers the error number corresponding to the action that
created the |
Name | errorText |
---|---|
Example |
var tamResult = tamClient.query("Telephone[Firstname='Bill']"); if (tamResult.errorNo) { alert(tamResult.errorText); return(tamResult.errorNO) } // if no error { ...} |
Description |
This delivers the error text corresponding to the action that
created the |
Name | DOM |
---|---|
Example |
var dom = tamResult.DOM; var newPar=dom.createElement("P"); newPar.appendChild( dom.createTextNode("Mary had a little Lamb")); |
Description |
This delivers the complete Tamino response as a DOM object (provided it can successfully be parsed). This has two uses:
|
Name | REQ |
---|---|
Example |
var req = tamResult.REQ; var status=req.status; |
Description |
This delivers the XML HTTP request object used to generate the
The request object is described in the Microsoft Documentation and can be used to obtain further information about the HTTP request. The following properties are particularly useful:
The object has the method
|
Name | lastQuery |
---|---|
Example |
var tamResult = tam.getDocument(somerelativeurl); if (tamResult.errorNo) alert(tamResult.lastQuery + " gave " + tamResult.errorText); |
Description |
This property records the URL used to retrieve the
|
Name | xmlbase |
---|---|
Example | |
Description | If not null, it overrides
lastQuery as document base.
|
Name | BIN |
---|---|
Example |
var tamResult = tamClient.getBinary("Smiley"); var bytes = tamResult.BIN; |
Description | Delivers the Tamino response as an array of
bytes. Only set for a getBinary method call.
|
Name | closeCursor |
---|---|
Result Type | void |
Example | res.closeCursor() |
Description | If a cursor is open, it will be closed. No error is returned if a cursor is not open or Tamino returns an error. |
Name | nodes |
---|---|
Result Type | DOM NodeList |
Example |
var nodeList = tam.nodes(..); if (nodeList) then .. else .. |
Description | If the query delivers at least one result then
the result is a node list of elements, otherwise the result is null. It is an
abbreviation for getResult().childNodes .
|
Name | getResult |
---|---|
Result Type | DOM Node |
Example |
var XQLResult = tamResult.getResult(); if (XQLResult) then { var nodeList = XQLResult.childNodes; var nodeCount = nodeList.length; ... } else ... |
Description | If the operation that created a Tamino result
object delivers a query result, then this method delivers the result
wrapper element. Otherwise the method delivers null.
|
Name | getBooleanResult |
---|---|
Result Type | Boolean |
Example | |
Description | Decodes getResult() as a boolean.
|
Name | getNumericResult |
---|---|
Result Type | Number |
Example | |
Description | Decodes getResult() as a number.
|
Name | getInoId |
---|---|
Example | var inoId =
tamResult.getInoId(); |
Description | This delivers the ino:id from the first ino:object element in the Tamino response document. It is used to obtain the ino:id of the document when a successful store, insert or update is performed. In the case of other operations the value returned is null. |
Name | getDocType |
---|---|
Example | var docType =
tamResult.getDocType(); |
Description | This delivers the document type from the first ino:object element in the Tamino response document. It is used to obtain the document type of the document when a successful store, insert or update is performed. In the case of other operations the value returned is null. |
Name | getCollection |
---|---|
Example | var col =
tamResult.getCollection(); |
Description | This delivers the collection name from the first ino:object element in the Tamino response document. It is used to obtain the collection name of the document when a successful store, insert or update is performed. In the case of other operations the value returned is null. |
Name | getXMLBase(elementNode) |
---|---|
Result Type | String |
Example | |
Description | Calculates the xml:base value for
this node in the result document.
|
Name | extractURI(elementNode,
attribute) |
---|---|
Result Type | String |
Example | |
Description | Extracts an absolute URI from the attribute
within the element node taking the xml:base information into
account. The document base is the value of the
lastQuery property, which may be overriden by the
property xmlbase . This is useful in the XLink context.
|
Name | getNext |
---|---|
Result Type | TaminoResult |
Example | tamResult=tamResult.getNext(); |
Description | This causes a query for the next page of results
to be performed. The transaction context is that of the original object where
the query was performed. The result is a TaminoResult
object
|
Name | getPrev |
---|---|
Result Type | TaminoResult |
Example | tamResult=tamResult.getPrev(); |
Description | This causes a query for the previous page of
results to be performed. The transaction context is that of the original object
where the query was performed. The result is a
TaminoResult object.
|
Name | getFirst |
---|---|
Result Type | TaminoResult |
Example | tamResult=tamResult.getFirst(); |
Description | This causes a query for the first page of
results to be performed. The transaction context is that of the original object
where the query was performed. The result is a
TaminoResult object.
|
Name | getLast |
---|---|
Type | TaminoResult |
Example | tamResult=tamResult.getLast(); |
Description | This causes a query for the last page of results to be performed. The transaction context is that of the original object where the query was performed. The result is a Tamino result object. This feature delivers null in Tamino versions 2.x. |
Name | refresh |
---|---|
Type | TaminoResult |
Example | tamResult=tamResult.refresh(); |
Description | This causes a page of query results to be
regenerated. The transaction context is that of the original object where the
query was performed. The result is a TaminoResult
object. The user might call this after invoking
inodelete to remove an item from a page, to show the
page again.
|
Name | getTaminoVersion |
---|---|
Type | String |
Example |
tamResult=tam.diagnose("ping"); if (tamResult.errorNo) { ... // error detected } else { var taminoVersion=tamResult.getTaminoVersion(); } |
Description | The TaminoResult object
extracts the Tamino version from the Tamino response. This value is available
from every Tamino response.
|
Name | getServer |
---|---|
Type | Date |
Example |
tamResult=tam.diagnose("ping"); if (tamResult.errorNo) { ... // error detected } else { var taminoServer=tamResult.getServer(); } |
Description | The TaminoResult object
extracts the server name from the Tamino response. This value is available from
every Tamino response.
|
Name | getLastModified |
---|---|
Type | Date |
Example |
tamResult=tam.getDocument(someURL); if (tamResult.errorNo) { ... // error detected } else { var docDateTime = new Date(); docDateTime=tamResult.getLastModified(); } |
Description | The TaminoResult object
extracts the date and time of the last modification from the Tamino response.
For getDocument() and head()
it corresponds to the date-time when the specified document was most recently
modified.
|
Name | getContentType |
---|---|
Type | String |
Example |
tamResult=tam.head(someURL); if (tamResult.errorNo) { ... // error detected } else { var contentType=tamResult.getContentType(); } |
Description | The TaminoResult object
extracts the content type from the Tamino response. This value is available
from every Tamino response. Normally this is
"text/xml" for XML documents. However, for non-XML
documents it is the document's respective content type (for instance,
"image/gif").
|