fromXML: Convert an XML node to an R type

Description Usage Arguments Value Author(s) References See Also


Convert an XML node representing a Schema value to an S object. The different functions handle different types of SOAP objets. This also works on an XML string or filename. The fromSOAPArray supports the offset and position attributes for partially transmitted and sparse arrays. Currently, there are limits on the ....


fromXML(node, root = NULL, converters = SchemaPrimitiveConverters,
        append = TRUE, type = NULL, multiRefs = list(),
         namespaces = gatherNamespaceDefs(node))



the XML node (and sub-nodes) giving the SOAP content. The fromSOAP function works recursively, operating on sub-nodes, etc. This argument is the individual node.


the top-most node of the XML “document” which is used for resolving href references within elements to other nodes. This doesn't change across the recursive calls.


a named-list of functions. The names are used to find the appropriate converter for a non-array or non-struct SOAP object. The name comes from the value of the “xsi:type” attribute or from the string “xsd:<element name>” where element-name is the name of the XML node. This will become more advanced in the future. This allows user to provide call-specific customizations to the conversion rather than just relying on "global" method definitions.


a logical value indicating whether to merge the converters with the default SOAPPrimitiveConverters, or use them as is. This is available for covenience so that the caller doesn't have to perform the two-step merging herself.


an optional type identifier that if not specified is computed from the xsi:type attribute of the XML node (node) if available.




a list of namespace information providing the mappings of the prefix to the namespace URI so that we can correctly resolve types such as "xsd:string".


An R object corresponding to the information in the XML node. If there is a converter to create an instance of a class defined from the XML schema, then this is what is returned.


Duncan Temple Lang <>


See Also

The SSOAP package.

sckott/XMLSchema documentation built on May 29, 2019, 3:46 p.m.