~ubuntu-branches/ubuntu/wily/r-cran-rsdmx/wily-proposed

« back to all changes in this revision

Viewing changes to R/SDMX-methods.R

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2015-07-18 11:08:39 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20150718110839-9jwuymnt13xuu52v
Tags: 0.4.7+dfsg-1
Imported Upstream version 0.4.7+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
  ns <- c(ns = namespaces$uri[grep(regexp, namespaces$uri)])
90
90
  return(ns)
91
91
}
 
92
 
 
93
#isSoapRequestEnvelope
 
94
isSoapRequestEnvelope <- function(xmlObj){
 
95
  namespaces <- namespaces.SDMX(xmlObj)
 
96
  ns <- c(ns = namespaces$uri[grep("soap", namespaces$uri)])
 
97
  return(length(ns) > 0)
 
98
}
 
99
 
 
100
#getSoapRequestResult
 
101
getSoapRequestResult <- function(xmlObj){
 
102
  body <- xmlChildren(xmlRoot(xmlObj))
 
103
  response <- xmlChildren(body[[1]]); rm(body);
 
104
  result <- xmlChildren(response[[1]]); rm(response);
 
105
  sdmxDoc <- xmlDoc(xmlChildren(result[[1]])[[1]]); rm(result);
 
106
  return(sdmxDoc)
 
107
}