coerceArgumentCode {XMLSchema} | R Documentation |
This function is used to generate an R expression/command that will coerce an R value to another R value that corresponds to an XML schema type. The resulting value can then be serialized to XML, e.g. in a Web service (e.g. SSOAP) request
This function is used when programmatically generating R functions to interface to Web services and other facilities which involve serializing R values from users to XML.
coerceArgumentCode(id, type)
id |
the name of the variable to be coerced |
type |
the SOAPType-class describing the XML schema
type expected. |
A string or R expression giving the R command to convert
id
.
Duncan Temple Lang
tt = SOAPType("int", nsuri = "http://www.w3.org/2001/XMLSchema", obj = new("PrimitiveSOAPType")) coerceArgumentCode("x", tt) tt = SOAPType("string", nsuri = "http://www.w3.org/2001/XMLSchema", obj = new("PrimitiveSOAPType")) coerceArgumentCode("x", tt) tt = SOAPType("Hybrid", nsuri = "http://www.w3.org/2001/XMLSchema", obj = new("SOAPType")) coerceArgumentCode("x", tt)