Re: libxml: is it possible not to use doctype declaration?
- From: ruud grosmann <r.grosmann@xxxxxxxxx>
- Date: Tue, 29 Jul 2008 09:44:36 -0500
hi Phlip,
thanks for the suggestion. The document is not an HTML document. It is
an XML document. It is something like this:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test PUBLIC "-//FARAWAY//DTD-verweg//NL"
"http://some.site.nl/dtd/test.dtd">
<test>
<p>this is a test</p>
</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 <phlip2005@xxxxxxxxx> 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
.
- References:
- libxml: is it possible not to use doctype declaration?
- From: ruud grosmann
- Re: libxml: is it possible not to use doctype declaration?
- From: Phlip
- libxml: is it possible not to use doctype declaration?
- Prev by Date: Re: text comparision
- Next by Date: Re: Concurrent Ruby?
- Previous by thread: Re: libxml: is it possible not to use doctype declaration?
- Next by thread: Re: libxml: is it possible not to use doctype declaration?
- Index(es):
Relevant Pages
|