From: ruud grosmann Date: 2008-07-31T16:51:21+09:00 Subject: Re: libxml: is it possible not to use doctype declaration? hi Mark, thanks for this hint. I had decided libxslt was not for me because of a probblem with garbage collection after starting to use it (see other post). So a good alternative is welcome. I'll check it out later this week. regards, Ruud On 31/07/2008, Mark Guzman wrote: > Give fastxml a try. It's also a ruby interface to libxml. > http://github.com/segfault/fastxml/tree/master > http://fastxml.rubyforge.org/ > --mg > > ruud grosmann wrote: >> hi all, >> >> I have tried to find elements in XML documents with xpath expression >> support in libxml: >> >> require 'xml/libxml' >> doc = XML::Document.file( file) >> node = doc.find_first( 'doc/p[@att]/@att') >> >> 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. >> >> Is there a way to tell the Document-object that it should ignore the >> doctype declaration if present? Or should I first remove the >> declaration from the document before calling new? >> >> regard, Ruud >> >> > >