From 171c55fdf0b8c2318666406c0f229957c0c5a34e Mon Sep 17 00:00:00 2001
From: unknown <ldecicco@usgs.gov>
Date: Mon, 1 Dec 2014 16:24:56 -0600
Subject: [PATCH] Took out url.exists.

---
 R/importWaterML1.r | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/R/importWaterML1.r b/R/importWaterML1.r
index 2e4e72c9..7fd6fc56 100644
--- a/R/importWaterML1.r
+++ b/R/importWaterML1.r
@@ -86,7 +86,9 @@
 #' inactiveAndAcitive <- importWaterML1(inactiveAndAcitive)
 importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
   
-  if(url.exists(obs_url)){
+  if(file.exists(obs_url)){
+    doc <- xmlTreeParse(obs_url, getDTD = FALSE, useInternalNodes = TRUE)
+  } else {
     doc = tryCatch({
       h <- basicHeaderGatherer()
       returnedDoc <- getURI(obs_url, headerfunction = h$update)
@@ -106,8 +108,6 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
       message(e)
       return(NA)
     }) 
-  } else {
-    doc <- xmlTreeParse(obs_url, getDTD = FALSE, useInternalNodes = TRUE)
   }
   
   if(tz != ""){
-- 
GitLab