var doc = getDocumentFromXML('<section>Alice<span>has</span>a cat</section>'),
textNode1 = doc.root.contents()[0],
textNode2 = doc.root.contents()[2];
var doc = getDocumentFromXML('<section>Alice<span>has</span>a cat</section>'),
textNode1 = doc.root.contents()[0],
textNode2 = doc.root.contents()[2];