Error Reading Bovespa XML Files with R

Asked

Viewed 407 times

1

I tried to use all libraries for manipulation of XML available on R which I found, but I could not, with any of them, perform the reading of the new closing quotation files made available by Bovespa(current B3) on its website, on link, filing cabinet BVBG.086.01 PriceReport.

I don’t know if I should make any modifications to these files preliminarily, but the fact is that the R does not recognize these files XML as XML, and it would take a lot to be able to manipulate this data within the tool in my work.

Thank you for your attention

1 answer

1

I was able to read the data without problems using the package xml:

library(XML)

# primeiro arquivo
b3 <- xmlTreeParse(file = "BVBG.086.01_BV000328201901310328000001834044379.xml")

# segundo arquivo
b3 <- xmlTreeParse(file = "BVBG.086.01_BV000328201901310328000001859152868.xml")

# terceiro arquivo
b3 <- xmlTreeParse(file = "BVBG.086.01_BV000328201901310328000001933430443.xml")
  • Hello Marcus Sorry, I’m pretty new to R programming. Using xmlParse was not working, and with xmlTreeThis file read went well, although the file got pretty big with 1.3Gb here). Can you give me a hand on getting the data below in a dataframe? Basically are the asset code, business price and volume traded (maximum, minimum, etc) Although I have read a lot these last days, I could not get any advance. <Tckrsymb>PETR4T</Tckrsymb> Thank you very much already

Browser other questions tagged

You are not signed in. Login or sign up in order to post.