From: ruud grosmann Date: 2008-07-29T23:44:36+09:00 Subject: Re: libxml: is it possible not to use doctype declaration? hi Phlip, thanks for the suggestion. The document is not an HTML document. It is an XML document. It is something like this:

this is a test

I don't want XML::Document to resolve the URL and waiting for a timeout. I couldn't find anything in the documentation on this. regards, Ruud On 29/07/2008, Phlip wrote: > ruud grosmann wrote: > >> This works fine, but not if the document contains a doctype >> declaration with a system identifier. For some reason, libxml tries to >> resolve it. Leading to significant performances issues. > > If the doctype is an HTML, open the document like this: > > xp = XML::HTMLParser.new() > xp.string = xhtml > XML::Parser.default_pedantic_parser = false > doc = xp.parse > > My assertxpath gem shows how, in the method assert_libxml. > > -- > Phlip > >