XML::DTD::AttList - Perl module representing an ATTLIST declaration in an XML DTD.
use XML::DTD::AttList; my $entman = XML::DTD::EntityManager->new; my $att = XML::DTD::AttList::new($entman, '<!ATTLIST a b CDATA #IMPLIED>');
XML::DTD::AttList is a Perl module representing an ATTLIST declaration in an XML DTD. The following methods are provided.
$entman = XML::DTD::EntityManager->new; $attlist = new XML::DTD::AttList($entman, '<!ATTLIST a b CDATA #IMPLIED>'); Constructs a new XML::DTD::AttList object.
$xo = new XML::Output({'fh' => *STDOUT}); $attlist->writexml($xo);
Write an XML representation of the attribute list.
$eltname = $attlist->name();
Return the name of the element with which the attribute list is associated.
$nmlst = $attlist->attribnames;
Return an array of attribute names (associated with a specific element) as an array reference.
$attdefobj = $attlist->attribute('attribname');
Return the attribution definition object (of type XML::DTD::AttDef) associated with the specified name.
$attlist->merge($otherattlist);
Merge another attribute list's attribute declarations with this one's. Where the same attribute name is declared in both, keep the one already in <$attlist>.
XML::DTD, XML::DTD::Component, XML::DTD::AttDef
Brendt Wohlberg <wohl@cpan.org>
Copyright (C) 2004-2010 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.
Peter Lamb <Peter.Lamb@csiro.au> improved entity substitution and corrected handling of multiple declarations of attributes for the same element.
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.