Hi,

I'm new to R, and found this code confusing.  It is from the bioconductor
package "RpsiXML".

  entryCount <- length(nodes)

The "nodes" object is either the argument nor generated in the function.
How can R find the "nodes" object?  What am I missing here?

Thanks

Zheng Jk


parseXmlEntryNodeSet <- function(psimi25file, psimi25source, verbose=TRUE) {

  psimi25Doc <- xmlTreeParse(psimi25file, useInternalNodes = TRUE)

  psimi25NS <- getDefaultNamespace(psimi25Doc)
  namespaces <- c(ns = psimi25NS)
  entry <- getNodeSet(psimi25Doc, "/ns:entrySet/ns:entry", namespaces)

  if(verbose)
    statusDisplay(paste(length(entry),"Entries found\n",sep=" "))

  entryCount <- length(nodes)
  entryList <- list()
  for(i in 1:entryCount) {
    entryList[[i]] <- parseXmlEntryNode(doc=psimi25Doc, index=i,
                                        namespaces=namespaces,
                                        psimi25source=psimi25source,
                                        verbose=verbose)
  }

	[[alternative HTML version deleted]]

