home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / Dtd.pod < prev    next >
Encoding:
Text File  |  2003-08-22  |  1.2 KB  |  61 lines

  1. =head1 NAME
  2.  
  3. XML::LibXML::Dtd - XML::LibXML DTD Handling
  4.  
  5. =head1 SYNOPSIS
  6.  
  7.   $dtd = XML::LibXML::Dtd->new($public_id, $system_id)
  8.   $dtd = XML::LibXML::Dtd->parse_string($dtd_str)
  9.  
  10.  
  11. =head1 DESCRIPTION
  12.  
  13. This class holds a DTD. You may parse a DTD from either a string, or from an
  14. external SYSTEM identifier.
  15.  
  16. No support is available as yet for parsing from a filehandle.
  17.  
  18. XML::LibXML::Dtd is a sub-class of Node, so all the methods available to nodes
  19. (particularly toString()) are available to Dtd objects.
  20.  
  21. =over 4
  22.  
  23. =item B<new>
  24.  
  25.   $dtd = XML::LibXML::Dtd->new($public_id, $system_id)
  26.  
  27. Parse a DTD from the system identifier, and return a DTD object that you can
  28. pass to $doc->is_valid() or $doc->validate().
  29.  
  30.    my $dtd = XML::LibXML::Dtd->new(
  31.                         "SOME // Public / ID / 1.0",
  32.                         "test.dtd"
  33.                                   );
  34.    my $doc = XML::LibXML->new->parse_file("test.xml");
  35.    $doc->validate($dtd);
  36.  
  37.  
  38. =item B<parse_string>
  39.  
  40.   $dtd = XML::LibXML::Dtd->parse_string($dtd_str)
  41.  
  42. The same as new() above, except you can parse a DTD from a string.
  43.  
  44.  
  45.  
  46. =back
  47.  
  48. =head1 AUTHORS
  49.  
  50. Matt Sergeant, 
  51. Christian Glahn, 
  52. =head1 VERSION
  53.  
  54. 1.56
  55.  
  56. =head1 COPYRIGHT
  57.  
  58. 2001-2002, AxKit.com Ltd; 2001-2003 Christian Glahn, All rights reserved.
  59.  
  60. =cut
  61.