This set of examples is a little more complex than usual. The fromXML and toXML methods can be found in packages identified by the namespace identifier of an XML tag. Therefore, to test this, we need to have test packages. This directory contains code for two very simple packages: myPackage and myOtherPackage. These can be installed in the usual way something like:
 make myPackage R_PKG_DIR=/tmp/R
 cd /tmp/R
 mkdir tmp
 R INSTALL -l tmp myPackage
Similarly, install myOtherPackage into the same /tmp/R/tmp directory. Now, the R commands
 library(RSXMLObjects)
 library(myPackage)
 library(myOtherPackage)
 invisible(readXMLObject("test.xml"))
should give
In myOtherPackage:fromXML.tag1 tag1
In myPackage:fromXML.tag1 tag1 myPackage
In myPackage:fromXML.tag2 tag2 myPackage
In myOtherPackage:fromXML.tag1 tag1 myOtherPackage
In myOtherPackage:fromXML.tag2 tag2 myOtherPackage
In myOtherPackage:fromXML.generic generic
[1] "In fromXML.default for test "  

Duncan Temple Lang <duncan@research.bell-labs.com>
Last modified: Tue Jan 30 08:29:18 EST 2001