https://github.com/cran/XML
Raw File
Tip revision: 3c0b64398bf79b865a4134380b14356c1683f77f authored by Duncan Temple Lang on 31 May 2015, 00:00:00 UTC
version 3.98-1.2
Tip revision: 3c0b643
functionIndex.Sxml
<?xml version="1.0"?>
<!DOCTYPE SSource SYSTEM
"/home/duncan/Projects/org/omegahat/XML/RS/examples/SSource.dtd"
[ 
  <!ENTITY TeX "TeX">
  <!ENTITY sgets "<-">
]>
<SSource>

  <overview>

  </overview>

  <function>
    <sname>functionIndex</sname>
    <selfDoc>
      <description>
        This function returns the names of the functions that are to
        be defined in this file. This allows one to know ahead of time
        what functions the file defines and to source specific
        functions from this file using the 
<!-- How should we link to an argument in an R/S help file -->
        <sarg>which</sarg> argument of <sobject>xmlSource</sobject>
      </description>
    </selfDoc>
    <def>
      function(file, ...) {
        d &sgets; xmlRoot(xmlTreeParse(file, ...))
        sapply(d[names(d) == "function"],
                    function(x) {
                      if(!is.na(match("sname", names(x))))
                       xmlValue(x[["sname"]][[1]])
                      else {
                        xmlValue(x[[1]][[1]])
                      }
                    })
      }
    </def>
  </function>

</SSource>
back to top