XML::Smart::DTD - DTD parser for XML::Smart.
This will parse DTD and provides methods to access the information stored in the
DTD.
use XML::Smart::DTD ;
my $dtd = XML::Smart::DTD->new('some.dtd') ;
if ( $dtd->child_exists('tag1','subtag1') ) {
...
}
use Data::Dumper ;
print Dumper( $dtd->tree ) ;
Return TRUE if the attribute exists in the element TAG.
Return TRUE if the child exists in the element TAG.
Return TRUE if the element TAG exists.
Return the default value of an attribute
Return the attribute type.
Return the defined values of an attribute.
Return the attribute list of a element.
Return the required attribute list of a element.
Return the child list of an element.
Return the required child list of an element.
Return the occurrence option of an element:
! REQUIRED AND ONLY ONE MATCH
+ 1 or more
* 0 or more
? 0 or 1
Same of get_elem_opt() but this element as a child
of an element.
Return TRUE if an attribute is FIXED.
Return TRUE if an attribute is REQUIRED.
Return TRUE if an element is ANY.
Return TRUE if an element can have multiple occurrences as a child of
TAG.
Return TRUE if an element is optional as a child of TAG.
Return TRUE if an element is optional as a child of TAG.
Return TRUE if an element is required and unique as a child of TAG.
Return TRUE if an element is PCDATA (have content).
Return TRUE if an element is EMPTY (doesn't have attributes,
content or children).
Return TRUE if an element can have multiple occurrences globally.
Return TRUE if an element is optional globally.
Return TRUE if the list of @PARENTS can be parent
of element TAG.
Return TRUE if an element is required globally.
Return TRUE if an element is unique and required globally.
Return the root name of the DTD.
Return the HASH tree of the DTD.
XML::Smart, XML::DTDParser.
Graciliano M. P. <gm@virtuasites.com.br>
I will appreciate any type of feedback (include your opinions
and/or suggestions). ;-P
Thanks to Jenda@Krynicky.cz http://Jenda.Krynicky.cz that is the author of
XML::DTDParser.
The DTD parser was based on XML-DTDParser-1.7 by Jenda@Krynicky.cz
http://Jenda.Krynicky.cz
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.