The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::DTD - Perl module for parsing XML DTDs

SYNOPSIS

  use XML::DTD;

  my $dtd = new XML::DTD;
  open(FH,'<file.dtd');
  $dtd->fread(*FH);
  close(FH);
  $dtd->fwrite(*STDOUT);

ABSTRACT

  XML::DTD is a Perl module for parsing XML DTD files.

DESCRIPTION

  XML::DTD is a Perl module for parsing XML DTDs. The following
  methods are provided.
new
  $dtd = new XML::DTD;

Constructs a new XML::DTD object.

fread
  $dtd->fread(*FILEHANDLE);

Parse a DTD file.

sread
  $dtd->sread($string);

Parse DTD text in a string.

fwrite
  $dtd->fwrite(*FILEHANDLE);

Write the DTD to a file.

swrite
  $string = $dtd->swrite();

Return the DTD text as a string.

fwritexml
  $dtd->fwritexml(*FILEHANDLE);

Write an XML representation of the DTD to a file.

swritexml
  $string = $dtd->swritexml();

Return an XML representation of the DTD text as a string.

elementlist
  $elts = $dtd->elementlist;

Return a list of element names.

element
  $eltobj = $dtd->element('elementname');

Return element object associated with the specified name.

attlist
  $attlistobj = $dtd->attlist('elementname');

Return atribute list object associated with the specified name.

SEE ALSO

XML::DTD::Parse, The XML 1.0 W3C Recommendation at http://www.w3.org/TR/REC-xml/

AUTHOR

Brendt Wohlberg <wohl@cpan.org>

COPYRIGHT AND LICENSE

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.