.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "XML::RPC::Enc::LibXML 3pm" .TH XML::RPC::Enc::LibXML 3pm "2022-06-28" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" XML::RPC::Enc::LibXML \- Encode/decode XML\-RPC using LibXML .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use XML::RPC::Fast; \& use XML::RPC::Enc::LibXML; \& \& my $rpc = XML::RPC::Fast\->new( \& $uri, \& encoder => XML::RPC::Enc::LibXML\->new( \& # internal_encoding currently not implemented, always want wide chars \& internal_encoding => undef, \& external_encoding => \*(Aqwindows\-1251\*(Aq, \& ) \& ); \& \& $rpc\->registerType( base64 => sub { \& my $node = shift; \& return MIME::Base64::decode($node\->textContent); \& }); \& \& $rpc\->registerType( \*(AqdateTime.iso8601\*(Aq => sub { \& my $node = shift; \& return DateTime::Format::ISO8601\->parse_datetime($node\->textContent); \& }); \& \& $rpc\->registerClass( DateTime => sub { \& return ( \*(AqdateTime.iso8601\*(Aq => $_[0]\->strftime(\*(Aq%Y%m%dT%H%M%S.%3N%z\*(Aq) ); \& }); \& \& $rpc\->registerClass( DateTime => sub { \& my $node = XML::LibXML::Element\->new(\*(AqdateTime.iso8601\*(Aq); \& $node\->appendText($_[0]\->strftime(\*(Aq%Y%m%dT%H%M%S.%3N%z\*(Aq)); \& return $node; \& }); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Default encoder/decoder for XML::RPC::Fast .PP If MIME::Base64 is installed, decoder for \f(CW\*(C`XML\-RPC\*(C'\fR type \f(CW\*(C`base64\*(C'\fR will be setup .PP If DateTime::Format::ISO8601 is installed, decoder for \f(CW\*(C`XML\-RPC\*(C'\fR type \f(CW\*(C`dateTime.iso8601\*(C'\fR will be setup .PP Also will be setup by default encoders for Class::Date and DateTime (will be encoded as \f(CW\*(C`dateTime.iso8601\*(C'\fR) .PP Ty avoid default decoders setup: .PP .Vb 5 \& BEGIN { \& $XML::RPC::Enc::LibXML::TYPES{base64} = 0; \& $XML::RPC::Enc::LibXML::TYPES{\*(AqdateTime.iso8601\*(Aq} = 0; \& } \& use XML::RPC::Enc::LibXML; .Ve .SH "IMPLEMENTED METHODS" .IX Header "IMPLEMENTED METHODS" .SS "new" .IX Subsection "new" .SS "request" .IX Subsection "request" .SS "response" .IX Subsection "response" .SS "fault" .IX Subsection "fault" .SS "decode" .IX Subsection "decode" .SS "registerType" .IX Subsection "registerType" .SS "registerClass" .IX Subsection "registerClass" .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 XML::RPC::Enc .Sp Base class (also contains documentation) .PP Q: What is the legal syntax (and range) for integers? How to deal with leading zeros? Is a leading plus sign allowed? How to deal with whitespace? .PP A: An integer is a 32\-bit signed number. You can include a plus or minus at the beginning of a string of numeric characters. Leading zeros are collapsed. Whitespace is not permitted. Just numeric characters preceded by a plus or minus. .PP Q: What is the legal syntax (and range) for floating point values (doubles)? How is the exponent represented? How to deal with whitespace? Can infinity and \*(L"not a number\*(R" be represented? .PP A: There is no representation for infinity or negative infinity or \*(L"not a number\*(R". At this time, only decimal point notation is allowed, a plus or a minus, followed by any number of numeric characters, followed by a period and any number of numeric characters. Whitespace is not allowed. The range of allowable values is implementation-dependent, is not specified. .PP .Vb 9 \& # int \& \*(Aq+0\*(Aq => 0 \& \*(Aq\-0\*(Aq => 0 \& \*(Aq+1234567\*(Aq => 1234567 \& \*(Aq0777\*(Aq => 777 \& \*(Aq0000000000000\*(Aq => 0 \& \*(Aq0000000000000000000000000000000000000000000000000\*(Aq => 0 \& # not int \& \*(Aq999999999999999999999999999999999999\*(Aq; .Ve .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright (c) 2008\-2009 Mons Anderson. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "AUTHOR" .IX Header "AUTHOR" Mons Anderson, \f(CW\*(C`\*(C'\fR