XML::DTD - Perl module for parsing XML DTDs
use XML::DTD; my $dtd = new XML::DTD; open(FH,'<file.dtd'); $dtd->fread(*FH); close(FH); $dtd->fwrite(*STDOUT);
XML::DTD is a Perl module for parsing XML DTD files.
XML::DTD is a Perl module for parsing XML DTDs. The following methods are provided.
$dtd = new XML::DTD;
Constructs a new XML::DTD object.
$dtd->fread(*FILEHANDLE);
Parse a DTD file.
$dtd->sread($string);
Parse DTD text in a string.
$dtd->fwrite(*FILEHANDLE);
Write the DTD to a file.
$string = $dtd->swrite();
Return the DTD text as a string.
$dtd->fwritexml(*FILEHANDLE);
Write an XML representation of the DTD to a file.
$string = $dtd->swritexml();
Return an XML representation of the DTD text as a string.
$elts = $dtd->elementlist;
Return a list of element names.
$eltobj = $dtd->element('elementname');
Return element object associated with the specified name.
$attlistobj = $dtd->attlist('elementname');
Return atribute list object associated with the specified name.
XML::DTD::Parse, The XML 1.0 W3C Recommendation at http://www.w3.org/TR/REC-xml/
Brendt Wohlberg <wohl@cpan.org>
Copyright (C) 2004-2006 by Brendt Wohlberg
This library is available under the terms of the GNU General Public License (GPL), described in the GPL file included in this distribution.
To install XML::DTD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::DTD
CPAN shell
perl -MCPAN -e shell install XML::DTD
For more information on module installation, please visit the detailed CPAN module installation guide.