library(XML)
library(xml2)
## Warning: package 'xml2' was built under R version 3.6.3
library(jsonlite)
library(RCurl)
## Loading required package: bitops
library(rjson)
## 
## Attaching package: 'rjson'
## The following objects are masked from 'package:jsonlite':
## 
##     fromJSON, toJSON
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
#HTML file books.html
html_url <- getURL("https://raw.githubusercontent.com/chitrarth2018/607-Assignment-7/master/Books.html")
books_html <- readHTMLTable(html_url, stringsAsFactors = FALSE)

#XML file books.xml
xml_url <- getURL("https://raw.githubusercontent.com/chitrarth2018/607-Assignment-7/master/Books.xml")
books_xml<-xmlToDataFrame(xml_url)

#JSON file books.json
json_url <- fromJSON(file="https://raw.githubusercontent.com/chitrarth2018/607-Assignment-7/master/Booksjs.json")
books_json <- do.call("rbind", lapply(json_url, data.frame, stringsAsFactors=FALSE))
rownames(books_json) <- NULL

books_html
## $`NULL`
##                                            Title                Author(s)
## 1                                     Statistics Robert White, John White
## 2                 Discovering Statistics Using R Andy Field, Jeremy Miles
## 3 Elementary Statistics: A Step By Step Approach             Allan Bluman
##             ISBN Price
## 1 978-0131497559 24.94
## 2 978-1446200469 23.79
## 3 978-9814738750 13.49
books_xml
##                                            Title                   Author
## 1                                     Statistics Robert White, John White
## 2                 Discovering Statistics Using R Andy Field, Jeremy Miles
## 3 Elementary Statistics: A Step By Step Approach             Allan Bluman
##             ISBN Price
## 1 978-0131497559 24.94
## 2 978-1446200469 23.79
## 3 978-9814738750 13.49
books_json
##                                            Title                   Author
## 1                                     Statistics Robert White, John White
## 2                 Discovering Statistics Using R Andy Field, Jeremy Miles
## 3 Elementary Statistics: A Step By Step Approach             Allan Bluman
##             ISBN Price
## 1 978-0131497559 24.94
## 2 978-1446200469 23.79
## 3 978-9814738750 13.49
#As can be seen from the console outputs for the last three commands that all the imported file appear to be equivalent. However there are subtle differences - for example in the XML import method all the variables ended up being imported as factor.