Implementation of some XML/XMLList functions per spec