WaterMLVersion: WaterMLVersion

Description Usage Arguments Value Examples

View source: R/WaterMLVersion.R

Description

A helper function that finds out the WaterML version from the WaterML document. By default it checks for "http://www.opengis.net/waterml/2.0" Otherwise it tries to detect "http://www.cuahsi.org/waterML/1.1/" (for WaterML 1.1) or "http://www.cuahsi.org/WaterML/1.0/" (for WaterML 1.0)

Usage

1

Arguments

doc

The XML document object

Value

A character with the WaterML version: either 1.0, 1.1, or 2.0

Examples

1
2
3
4
5
6
library(httr)
library(XML)
url <- "http://www.waterml2.org/KiWIS-WML2-Example.wml"
response <- GET(url)
doc <- xmlParse(response)
version <- WaterMLVersion(doc)

WaterML documentation built on April 10, 2021, 9:05 a.m.