/*
* call-seq:
* new
*
* Create a new document
*/
static VALUE new(int argc, VALUE *argv, VALUE klass)
{
VALUE uri, external_id;
rb_scan_args(argc, argv, "02", &uri, &external_id);
htmlDocPtr doc = htmlNewDoc(
RTEST(uri) ? (const xmlChar *)StringValuePtr(uri) : NULL,
RTEST(external_id) ? (const xmlChar *)StringValuePtr(external_id) : NULL
);
return Nokogiri_wrap_xml_document(klass, doc);
}