Commit cf4d524c authored by David Watkins's avatar David Watkins
Browse files

fix WML2 parsing that was hanging up

parent 34f5faec
......@@ -159,9 +159,9 @@ importWaterML2 <- function(input, asDateTime=FALSE, tz="UTC") {
time = character(0), dateTime = character(0), value = numeric(0),
uom = character(0), comment = character(0), stringsAsFactors = FALSE))
}
rawTime <- xml_text(xml_find_all(TVP, "./wml2:time"))
rawTime <- xml_text(xml_find_all(returnedDoc, ".//wml2:MeasurementTVP/wml2:time"))
valueNodes <- xml_find_all(TVP,"./wml2:value")
valueNodes <- xml_find_all(returnedDoc, ".//wml2:MeasurementTVP/wml2:value")
charValues <- xml_text(valueNodes)
nilValues <- as.logical(xml_attr(valueNodes, "nil"))
charValues[nilValues] <- NA
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment