from_xmlrpc: Convert from the 'XML-RPC' Format into an R Object.

Description Usage Arguments Value Examples

Description

Convert an object of class "xml_code" or a character in the XML-RPC Format into an R Object.

Usage

1
from_xmlrpc(xml, raise_error = TRUE)

Arguments

xml

a character string containing XML in the remote procedure call protocol format.

raise_error

a logical controling the behavior if the XML-RPC signals a fault. If TRUE an error is raised, if FALSE an object inheriting from "c("xmlrpc_error", "error")" is returned.

Value

an R object derived from the input.

Examples

1
2
3
params <- list(1L, 1:3, rnorm(3), LETTERS[1:3], charToRaw("A"))
xml <- to_xmlrpc("some_method", params)
from_xmlrpc(xml)

Example output

[[1]]
[1] 1

[[2]]
[[2]][[1]]
[1] 1

[[2]][[2]]
[1] 2

[[2]][[3]]
[1] 3


[[3]]
[[3]][[1]]
[1] -0.9905822

[[3]][[2]]
[1] -1.561418

[[3]][[3]]
[1] 1.133232


[[4]]
[[4]][[1]]
[1] "A"

[[4]][[2]]
[1] "B"

[[4]][[3]]
[1] "C"


[[5]]
[1] 41

xmlrpc2 documentation built on May 1, 2019, 10:29 p.m.

Related to from_xmlrpc in xmlrpc2...