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 / LibXML.pod < prev    next >
Encoding:
Text File  |  2003-08-22  |  4.0 KB  |  202 lines

  1. =head1 NAME
  2.  
  3. XML::LibXML - Perl Binding for libxml2
  4.  
  5. =head1 SYNOPSIS
  6.  
  7.   $libxmlnode = XML::LibXML->import_GDOME( $node, $deep );
  8.   $gdomenode = XML::LibXML->export_GDOME( $node, $deep );
  9.  
  10.  
  11. =head1 DESCRIPTION
  12.  
  13.  
  14. =head1 SYNOPSIS
  15.  
  16.   use XML::LibXML;
  17.   my $parser = XML::LibXML->new();
  18.   
  19.   my $doc = $parser->parse_string(<<'EOT');
  20.   <some-xml/>
  21.   EOT
  22.  
  23.  
  24. =head1 DESCRIPTION
  25.  
  26. This module is an interface to the gnome libxml2 DOM and SAX parser and the DOM
  27. tree. It also provides an XML::XPath-like findnodes() interface, providing
  28. access to the XPath API in libxml2. The module is split into several packages
  29. which are not described in this section.
  30.  
  31. For further information, please check the following documentation:
  32.  
  33. =over 4
  34.  
  35. =item B<XML::LibXML::Parser>
  36.  
  37. Parsing XML Files with XML::LibXML
  38.  
  39.  
  40. =item B<XML::LibXML::DOM>
  41.  
  42. XML::LibXML DOM Implementation
  43.  
  44.  
  45. =item B<XML::LibXML::SAX>
  46.  
  47. XML::LibXML direct SAX parser
  48.  
  49.  
  50. =item B<XML::LibXML::Document>
  51.  
  52. XML::LibXML DOM Document Class
  53.  
  54.  
  55. =item B<XML::LibXML::Node>
  56.  
  57. Abstract Base Class of XML::LibXML Nodes
  58.  
  59.  
  60. =item B<XML::LibXML::Element>
  61.  
  62. XML::LibXML Class for Element Nodes
  63.  
  64.  
  65. =item B<XML::LibXML::Text>
  66.  
  67. XML::LibXML Class for Text Nodes
  68.  
  69.  
  70. =item B<XML::LibXML::Comment>
  71.  
  72. XML::LibXML Comment Nodes
  73.  
  74.  
  75. =item B<XML::LibXML::CDATASection>
  76.  
  77. XML::LibXML Class for CDATA Sections
  78.  
  79.  
  80. =item B<XML::LibXML::Attr>
  81.  
  82. XML::LibXML Attribute Class
  83.  
  84.  
  85. =item B<XML::LibXML::DocumentFragment>
  86.  
  87. XML::LibXML's DOM L2 Document Fragment Implementation
  88.  
  89.  
  90. =item B<XML::LibXML::Namespace>
  91.  
  92. XML::LibXML Namespace Implementation
  93.  
  94.  
  95. =item B<XML::LibXML::PI>
  96.  
  97. XML::LibXML Processing Instructions
  98.  
  99.  
  100. =item B<XML::LibXML::Dtd>
  101.  
  102. XML::LibXML DTD Support
  103.  
  104.  
  105. =item B<XML::LibXMLguts>
  106.  
  107. Internal of the Perl Layer for libxml2
  108.  
  109.  
  110.  
  111. =back
  112.  
  113.  
  114. =head1 RELATED MODULES
  115.  
  116. The modules described in this section are not part of the XML::LibXML package
  117. itself. As they support some additional features, they are mentioned here.
  118.  
  119. =over 4
  120.  
  121. =item B<XML::LibXSLT>
  122.  
  123. XSLT Processor using libxslt and XML::LibXML
  124.  
  125.  
  126. =item B<XML::LibXML::Common>
  127.  
  128. Common functions for XML::LibXML related Classes
  129.  
  130.  
  131. =item B<XML::LibXML::Iterator>
  132.  
  133. XML::LibXML Implementation of the DOM Traversal Specification
  134.  
  135.  
  136. =item B<XML::LibXML::XPathContext>
  137.  
  138. Advanced XPath processing using libxml2 and XML::LibXML
  139.  
  140.  
  141.  
  142. =back
  143.  
  144.  
  145. =head1 XML::LIBXML AND XML::GDOME
  146.  
  147. Note: THE FUNCTIONS DESCRIBED HERE ARE STILL EXPERIMENTAL
  148.  
  149. Although both modules make use of libxml2's XML capabilities, the DOM
  150. implementation of both modules are not compatible. But still it is possible to
  151. exchange nodes from one DOM to the other. The concept of this exchange is
  152. pretty similar to the function cloneNode(): The particular node is copied on
  153. the lowlevel to the opposite DOM implementation.
  154.  
  155. Since the DOM implementations cannot coexist with in one document, one is
  156. forced to copy each node that should be used. Because of keeping allways two
  157. nodes this may cause quite an impact on a machines memory useage.
  158.  
  159. XML::LibXML provides two functions to export or import GDOME nodes:
  160. import_GDOME() and export_GDOME(). Both function have two parameters: the node
  161. and a flag for recursive import. The flag works as in cloneNode().
  162.  
  163. The two functions allow to export and import XML::GDOME nodes explicitly,
  164. however, XML::LibXML allows also the transparent import of XML::GDOME nodes in
  165. functions such as appendChild(), insertAfter() and so on. While native nodes
  166. are automaticly adopted in most functions XML::GDOME nodes are allways cloned
  167. in advance. Thus if the original node is modified after the operation, the node
  168. in the XML::LibXML document will not have this information.
  169.  
  170. =over 4
  171.  
  172. =item B<import_GDOME>
  173.  
  174.   $libxmlnode = XML::LibXML->import_GDOME( $node, $deep );
  175.  
  176. This clones an XML::GDOME node to a XML::LibXML node explicitly.
  177.  
  178.  
  179. =item B<export_GDOME>
  180.  
  181.   $gdomenode = XML::LibXML->export_GDOME( $node, $deep );
  182.  
  183. Allows to clone an XML::LibXML node into a XML::GDOME node.
  184.  
  185.  
  186.  
  187. =back
  188.  
  189. =head1 AUTHORS
  190.  
  191. Matt Sergeant, 
  192. Christian Glahn, 
  193. =head1 VERSION
  194.  
  195. 1.56
  196.  
  197. =head1 COPYRIGHT
  198.  
  199. 2001-2002, AxKit.com Ltd; 2001-2003 Christian Glahn, All rights reserved.
  200.  
  201. =cut
  202.