- saveResult(data) - this saves the transformed data and *must* be called at the end of the transform code
- debug(data) - outputs the data to the console to assist with debugging transform code
- getElementById(id, [currentElement]) - finds the element with the specified ID (returns 0 or 1 element)
- getElementsByTagName(name, [currentElement]) - returns a list of elements matching the name specificed
- getElementsByTagType(type, [currentElement]) - returns a list of elements matching the type specificed (valid types are "text", "directive", "comment", "script", "style", and "tag")
- getElements(attributes, [currentElement]) - returns a list of elements matching the attributes specified. There are two special attribute names, "tag_type" and "tag_name", which correspond to the tag's type and name, respectively
getElementById("squee", data[0]);
getElementById(
function (value) { return(value.indexOf("taco") == 0); }
, data[0]
);
getElements(
{
type: "button"
, class: function (value) { return(value == "jester"); }
}
, data[0]
);