Download Pazpar2 - User's Guide and Reference

Transcript
Pazpar2 - User’s Guide and Reference
13 / 52
bytarget () start polling for target status
stat () start polling for pazpar2 status
pz2.js comes with a set of cross-browser helper classes and functions.
Ajax helper class
pzHttpRequest a cross-browser Ajax wrapper class
constructor (url, errorHandler) create new request for a given url
get (params, callback) asynchronous, send the request with given parameters (array) and call callback
with response as parameter
post (params, data, callback) asychronous, post arbitrary data (may be XML doc) and call callback with
response as parameter
load () synchronous, returns the response for the given request
XML helper functions
document.newXmlDoc (root) create new XML document with root node as specified in parameter
document.parseXmlFromString (xmlString) create new XML document from string
document.transformToDoc (xmlDoc, xslDoc) returns new XML document as a result
Element_removeFromDoc (DOM_Element) remove element from the document
Element_emptyChildren (DOM_Element)
Element_appendTransformResult (DOM_Element, xmlDoc, xslDoc) append xsl transformation result
to a DOM element
Element_appendTextNode (DOM_Element, tagName, textContent) append new text node to the element
Element_setTextContent (DOM_Element, textContent) set text content of the element
Element_getTextContent (DOM_Element) get text content of the element
Element_parseChildNodes (DOM_Element) parse all descendants into an associative array