XML::LibXML::Common - Routines and Constants common for XML::LibXML and XML::GDOME
use XML::LibXML::Common;
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:
By default the W3 definitions as defined in the DOM specifications and the encoding functions are exported by XML::LibXML::Common.
$encodedstring = encodeToUTF8( $name_of_encoding, $sting_to_encode );
The function will encode a string from the specified encoding to UTF-8.
$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.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |