function loadURI(uri,async) {
var d = Sarissa.getDomDocument();
d.async = false;
d.load(uri);
if (d.parseError) throw("Error loading "+uri+": "+Sarissa.getParseErrorText(d));
return d;
}
Simple high-level wrapper for Sarissa
In some cases, Sarissa calls are too low-level for my needs. For example, sometimes I need a function that would load an XML document synchronously and just throw an error if something fails. Here it is:
Related Posts by Categories
Subscribe to:
Post Comments (Atom)
1 comment:
Cool, thanks -- I'm always looking for quick helper functions. Sarissa is really cool, but at times the code gets a little complex. This helps.
Post a Comment