Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ajt (2546)

  (email not shown publicly)

UK based. Perl, XML/HTTP, SAP, Debian hacker.

  • PerlMonks: ajt []
  • Local LUG: AdamTrickett []
  • Debian Administration: ajt []
  • LinkedIn: drajt []

Journal of ajt (2546)

Sunday April 06, 2003
04:19 PM

XML Catalogs

[ #11474 ]

This weekend I started to read about how XML catalogs work in XML::LibXML/libxml2. If you parse an XML document with libxml2 and it refers to an external document, then it tries to find it for you. The problem is that if this resource is on the public Internet, and you are not, then it sits around for about a minute before giving up.

A long time ago I noticed that when working with some RSS documents my tool-kit would take an age to complete the page. The problem was caused by the libxml2 parser not being able to reach the Internet and taking a very long time to build the page.

So this weekend, I tried to give XML Catalogs ago to cache external DTDs. It turns out that it's quite easy to create a catalog, and load in a local DTD rather than a remote one, so I dutifully added it to my module, and added extra tests and documentation. I ran the tests connected to the Internet and then not connected, only to discover that I had largely fixed it already......

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.