Skip to content

Commit 2b3c50c

Browse files
committed
#47 fix SDMX code parser
1 parent d11b82b commit 2b3c50c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

R/SDMXCode-methods.R

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ SDMXCode <- function(xmlObj){
4848
sapply(codeLabelsXML,
4949
function(x){
5050
lang <- xmlGetAttr(x,"xml:lang")
51+
if(is.null(lang)) lang <- "default"
5152
codeLabels[[lang]] <- xmlValue(x)
5253
})
5354
codeLabels <- as.list(codeLabels)

R/readSDMX.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ readSDMX <- function(file, isURL = TRUE){
1111
if(!file.exists(file))
1212
stop("File ", file, "not found\n")
1313
xmlObj <- xmlTreeParse(file, useInternalNodes = TRUE)
14-
status <- 1
14+
status <- 1
1515
}else{
1616
rsdmxAgent <- paste("rsdmx/",as.character(packageVersion("rsdmx")),sep="")
1717
content <- getURL(file, httpheader = list('User-Agent' = rsdmxAgent), ssl.verifypeer = FALSE)

0 commit comments

Comments
 (0)