R
ruud grosmann
hi all,
I have tried to find elements in XML documents with xpath expression
support in libxml:
require 'xml/libxml'
doc = XML:
ocument.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
I have tried to find elements in XML documents with xpath expression
support in libxml:
require 'xml/libxml'
doc = XML:
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