// ');
value_of(typeof xml).should_match('object');
},
'documentElement should be an object' : function() {
xml = tests_xml.parse('');
value_of(typeof xml.documentElement).should_be("object");
},
'DOM should be able to access documentElement nodeName' : function() {
xml = tests_xml.parse('');
value_of(xml.documentElement.nodeName).should_be("foo");
},
'DOM should be able to access documentElement nodeName from empty document' : function() {
xml = tests_xml.parse('');
value_of(xml.documentElement.nodeName).should_be("foo");
},
'DOM should be able to access attribute on document node' : function() {
xml = tests_xml.parse('');
value_of(xml.documentElement.getAttribute("version")).should_be("2.0");
},
'XPath should be able to access the documentElement' : function() {
xml = tests_xml.parse('hello');
value_of(xml.xpath("/foo", "string")).should_be("hello");
},
'XPath should be able to access the documentElement' : function() {
xml = tests_xml.parse('helloworld');
value_of(xml.xpath("/foo/bar", "string")).should_be("world");
},
'XPath count of nodeset containing elements' : function() {
xml = tests_xml.parse('');
value_of(xml.xpath("count(/foo/bar)", "number")).should_be(3);
}
});
// ]]>