XML::LibXML::Common(3pm) - phpMan

Command: man perldoc info search(apropos)  


Common(3pm)                    User Contributed Perl Documentation                    Common(3pm)



NAME
       XML::LibXML::Common - Routines and Constants common for XML::LibXML and XML::GDOME

SYNOPSIS
         use XML::LibXML::Common;

DESCRIPTION
       XML::LibXML and XML::GDOME share some of the same functionality. This package should
       bundle some shared constansts and functions, so both modules may coexist within the same
       scripts.

       XML::LibXML::Common defines all node types as constants. While XML::LibXML and XML::GDOME
       originally declared their own node type definitions, one may want to use
       XML::LibXML::Common in its compatibility mode:

       o   use XML::LibXML::Common qw(:libxml);

           :libxml will use the XML::LibXML Compatibility mode, which defines the old 'XML_'
           node-type definitions

       o   use XML::LibXML::Common qw(:gdome);

           This allows one to use the XML::LibXML Compatibility mode, which defines the old
           'GDOME_' node-type definitions

       o   use XML::LibXML::Common qw(:w3c);

           This uses the nodetype definition names as specified for DOM.

       o   use XML::LibXML::Common qw(:encoding);

           This is ment if only the encoding functions of XML::LibXML::Common should be used.

       By default the W3 definitions as defined in the DOM specifications and the encoding
       functions are exported by XML::LibXML::Common.

       encoding functions

       To encode or decode a string to or from UTF-8 XML::LibXML::Common exports two functions,
       which use the encoding mechanism of the underlaying implementation. These functions should
       be used, if external encoding is required (e.g. for queryfunctions).

       encodeToUTF8

           $encodedstring = encodeToUTF8( $name_of_encoding, $sting_to_encode );

       The function will encode a string from the specified encoding to UTF-8.

       decodeFromUTF8

           $decodedstring = decodeFromUTF8($name_of_encoding, $string_to_decode );

       This Function transforms an UTF-8 encoded string the specified encoding.  While transforms
       to ISO encodings may cause errors if the given stirng contains unsupported characters,
       both functions can transform to UTF-16 encodings as well.

       Note that both encoding functions report their errors on the standard error. If an error
       occours the function will croak(). To catch the error information it is required to call
       the encoding function from within an eval block to avoid a script to stop.

AUTHOR
       Christian Glahn, (christian.glahn AT uibk.at) Innsbruck University

COPYRIGHT
       (c) 2002 Christian Glahn. All rights reserved.

       This program is free software; you can redistribute it and/or modify it under the same
       terms as Perl itself.

SEE ALSO
       perl, XML::LibXML, XML::GDOME



perl v5.10.0                                2003-02-27                                Common(3pm)

Generated by $Id: phpMan.php,v 4.49 2006/02/26 13:18:18 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2012-05-25 10:57 @38.107.179.238 Crawled by CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
Valid XHTML 1.0!Valid CSS!