3 XML::LibXML::Dtd - XML::LibXML DTD Handling
11 $dtd = XML::LibXML::Dtd->new($public_id, $system_id);
12 $dtd = XML::LibXML::Dtd->parse_string($dtd_str);
13 $publicId = $dtd->getName();
14 $publicId = $dtd->publicId();
15 $systemId = $dtd->systemId();
19 This class holds a DTD. You may parse a DTD from either a string, or from an
20 external SYSTEM identifier.
22 No support is available as yet for parsing from a filehandle.
24 XML::LibXML::Dtd is a sub-class of L<<<<<< XML::LibXML::Node >>>>>>, so all the methods available to nodes (particularly toString()) are available
34 $dtd = XML::LibXML::Dtd->new($public_id, $system_id);
36 Parse a DTD from the system identifier, and return a DTD object that you can
37 pass to $doc->is_valid() or $doc->validate().
41 my $dtd = XML::LibXML::Dtd->new(
42 "SOME // Public / ID / 1.0",
45 my $doc = XML::LibXML->new->parse_file("test.xml");
51 $dtd = XML::LibXML::Dtd->parse_string($dtd_str);
53 The same as new() above, except you can parse a DTD from a string. Note that
54 parsing from string may fail if the DTD contains external parametric-entity
55 references with relative URLs.
60 $publicId = $dtd->getName();
62 Returns the name of DTD; i.e., the name immediately following the DOCTYPE
68 $publicId = $dtd->publicId();
70 Returns the public identifier of the external subset.
75 $systemId = $dtd->systemId();
77 Returns the system identifier of the external subset.
96 2001-2007, AxKit.com Ltd.
98 2002-2006, Christian Glahn.
100 2006-2009, Petr Pajas.