Add functions/types for XPath support.

It's in the general spirit of working with XML.  

If you want to create XML nodes, you haev to use document.implementation.createDocument.  If you call document.createDocument, it generates an HTML document.