| 1 |
|
| 2 |
use strict; |
| 3 |
use warnings; |
| 4 |
|
| 5 |
use Test::More tests => 1; |
| 6 |
|
| 7 |
use XML::LibXML; |
| 8 |
|
| 9 |
# XML::LibXML->load_catalog( "example/catalog.xml" ); |
| 10 |
|
| 11 |
# the following document should not be able to get parsed |
| 12 |
# if the catalog is not available |
| 13 |
|
| 14 |
my $doc = XML::LibXML->new( catalog => "example/catalog.xml" )->parse_string(<<EOF); |
| 15 |
<!DOCTYPE article |
| 16 |
PUBLIC "-//Perl//XML LibXML V4.1.2//EN" |
| 17 |
"http://axkit.org/xml-libxml/test.dtd"> |
| 18 |
<article> |
| 19 |
<pubData>Something here</pubData> |
| 20 |
<pubArticleID>12345</pubArticleID> |
| 21 |
<pubDate>2001-04-01</pubDate> |
| 22 |
<pubName>XML.com</pubName> |
| 23 |
<section>Foo</section> |
| 24 |
<lead>Here's some leading text</lead> |
| 25 |
<rest>And here is the rest...</rest> |
| 26 |
</article> |
| 27 |
EOF |
| 28 |
|
| 29 |
# TEST |
| 30 |
ok($doc, 'Doc was parsed with catalog'); |