Manual Pages for UNIX Darwin command on man XML::LibXML
MyWebUniversity

Manual Pages for UNIX Darwin command on man XML::LibXML

LibXML(3) User Contributed Perl Documentation LibXML(3)

NAME

XML::LibXML - Perl Binding for libxml2

SYNOPSIS

$VersionString = XML::LibXML::LIBXMLDOTTEDVERSION;

$VersionID = XML::LibXML::LIBXMLVERSION;

$libxmlnode = XML::LibXML->importGDOME( $node, $deep );

$gdomenode = XML::LibXML->exportGDOME( $node, $deep );

DESCRIPTION

SYNOPSIS

use XML::LibXML;

my $parser = XML::LibXML->new();

my $doc = $parser->parsestring(<<'EOT');

EOT

DESCRIPTION

This module is an interface to the gnome libxml2 DOM and SAX parser and

the DOM tree. It also provides an XML::XPath-like findnodes()

interface, providing access to the XPath API in libxml2. The module is split into several packages which are not described in this section. For further information, please check the following documentation: XXMMLL::::LLiibbXXMMLL::::PPaarrsseerr

Parsing XML Files with XML::LibXML

XXMMLL::::LLiibbXXMMLL::::DDOOMM

XML::LibXML DOM Implementation

XXMMLL::::LLiibbXXMMLL::::SSAAXX

XML::LibXML direct SAX parser

XXMMLL::::LLiibbXXMMLL::::DDooccuummeenntt

XML::LibXML DOM Document Class

XXMMLL::::LLiibbXXMMLL::::NNooddee

Abstract Base Class of XML::LibXML Nodes

XXMMLL::::LLiibbXXMMLL::::EElleemmeenntt

XML::LibXML Class for Element Nodes

XXMMLL::::LLiibbXXMMLL::::TTeexxtt

XML::LibXML Class for Text Nodes

XXMMLL::::LLiibbXXMMLL::::CCoommmmeenntt

XML::LibXML Comment Nodes

XXMMLL::::LLiibbXXMMLL::::CCDDAATTAASSeeccttiioonn

XML::LibXML Class for CDATA Sections

XXMMLL::::LLiibbXXMMLL::::AAttttrr

XML::LibXML Attribute Class

XXMMLL::::LLiibbXXMMLL::::DDooccuummeennttFFrraaggmmeenntt

XML::LibXML's DOM L2 Document Fragment Implementation

XXMMLL::::LLiibbXXMMLL::::NNaammeessppaaccee

XML::LibXML Namespace Implementation

XXMMLL::::LLiibbXXMMLL::::PPII

XML::LibXML Processing Instructions

XXMMLL::::LLiibbXXMMLL::::DDttdd

XML::LibXML DTD Support

XXMMLL::::LLiibbXXMMLL::::RReellaaxxNNGG

XML::LibXML frontend for RelaxNG schema validation

XXMMLL::::LLiibbXXMMLLgguuttss Internal of the Perl Layer for libxml2 (not done yet) VVEERRSSIIOONN IINNFFOORRMMAATTIIOONN

Sometimes it is usefull to figure out, for which version XML::LibXML

was compiled for. In most cases this is for debugging or to check if a given installation meets all functionality for the package. The

functiones XML::LibXML::LIBXMLDOTTEDVERSION and

XML::LibXML::LIBXMLVERSION provide this version information. Both

functions simply pass through the values of the similar named macros of libxml2. XXMMLL::::LLiibbXXMMLL::::LLIIBBXXMMLLDDOOTTTTEEDDVVEERRSSIIOONN

$VersionString = XML::LibXML::LIBXMLDOTTEDVERSION;

Returns the Versionstring of the libxml2 version XML::LibXML was

compiled for. This will be "2.6.2" for "libxml2 2.6.2". XXMMLL::::LLiibbXXMMLL::::LLIIBBXXMMLLVVEERRSSIIOONN

$VersionID = XML::LibXML::LIBXMLVERSION;

Returns the version id of the libxml2 version XML::LibXML was

compiled for. This will be "20602" for "libxml2 2.6.2". Don't mix

this version id with $XML::LibXML::VERSION. The latter contains the

version of XML::LibXML itself while the first contains the version

of libxml2 XML::LibXML was compiled for.

RREELLAATTEEDD MMOODDUULLEESS

The modules described in this section are not part of the XML::LibXML

package itself. As they support some additional features, they are mentioned here. XXMMLL::::LLiibbXXSSLLTT

XSLT Processor using libxslt and XML::LibXML

XXMMLL::::LLiibbXXMMLL::::CCoommmmoonn

Common functions for XML::LibXML related Classes

XXMMLL::::LLiibbXXMMLL::::IItteerraattoorr

XML::LibXML Implementation of the DOM Traversal Specification

XXMMLL::::LLiibbXXMMLL::::XXPPaatthhCCoonntteexxtt

Advanced XPath processing using libxml2 and XML::LibXML

XXMMLL::::LLIIBBXXMMLL AANNDD XXMMLL::::GGDDOOMMEE Note: THE FUNCTIONS DESCRIBED HERE ARE STILL EXPERIMENTAL Although both modules make use of libxml2's XML capabilities, the DOM implementation of both modules are not compatible. But still it is possible to exchange nodes from one DOM to the other. The concept of this exchange is pretty similar to the function cloneNode(): The particular node is copied on the lowlevel to the opposite DOM implementation. Since the DOM implementations cannot coexist within one document, one is forced to copy each node that should be used. Because you are always keeping two nodes this may cause quite an impact on a machines memory usage.

XML::LibXML provides two functions to export or import GDOME nodes:

importGDOME() and exportGDOME(). Both function have two parameters: the node and a flag for recursive import. The flag works as in cloneNode(). The two functions allow to export and import XML::GDOME nodes

explicitly, however, XML::LibXML allows also the transparent import of

XML::GDOME nodes in functions such as appendChild(), insertAfter() and so on. While native nodes are automaticly adopted in most functions XML::GDOME nodes are always cloned in advance. Thus if the original

node is modified after the operation, the node in the XML::LibXML

document will not have this information. iimmppoorrttGGDDOOMMEE

$libxmlnode = XML::LibXML->importGDOME( $node, $deep );

This clones an XML::GDOME node to a XML::LibXML node explicitly.

eexxppoorrttGGDDOOMMEE

$gdomenode = XML::LibXML->exportGDOME( $node, $deep );

Allows to clone an XML::LibXML node into a XML::GDOME node.

AUTHORS Matt Sergeant, Christian Glahn, Petr Pajas, VVEERRSSIIOONN 1.60 COPYRIGHT

2001-2006, AxKit.com Ltd; 2002-2006 Christian Glahn; 2006 Petr Pajas,

All rights reserved.

perl v5.8.8 2006-08-26 LibXML(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™