title: XML content does not seem to be XML using read text: '/var/folders/_v/4fhshkb92kq_bnyv7dkxmh9c0000gn/T//Rtmp17F8m5/tmp.CBPLpCrO9L/word/document.xml'
body: <p>I am currently working on a project in R where I collected a number of online news stories and saved them as pdfs in word. Then I attempted to upload the data into R and ran in to problems. The code I used is below:</p>
  
  <pre><code>setwd("/Users/dk/Dropbox/Corpus")
  getwd()
  directory&lt;-"/Users/dk/Dropbox/Corpus/nsle"
  directory
  library(quanteda)
  library(readtext)
  
  mydocs&lt;- readtext(directory, encoding = "UTF-8", docvarsfrom = "filenames")`
  </code></pre>
  
  <p>the error I am recieving is as follows:</p>
  
  <blockquote>
    <p>Error: XML content does not seem to be XML:
    '/var/folders/_v/4fhshkb92kq_bnyv7dkxmh9c0000gn/T//Rtmp17F8m5/tmp.CBPLpCrO9L/word/document.xml</p>
  </blockquote>
  
  <p>In addition: Warning message:
  In utils::unzip(i, exdir = td) : error 1 in extracting from zip file</p>
  
  <p>I am only asking the question on this website because all of the other askers were using XML or R-curl.
  When I mess with the directory- based on other answers- I receive this:</p>
  
  <blockquote>
    <p>Error in get(method, envir = home) :    lazy-load database
    '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/XML/R/XML.rdb'
    is corrupt In addition: Warning messages:</p>
    
    <p>1: In getSource(x,
    text_field = text_field, encoding = encoding, ...) :   Unsupported
    extension " r " of file /Users/dinaklimkina/Dropbox/Corpus/New Sample
    Legislature/New Project 08_03_18.R treating as plain text</p>
    
    <p>2: In utils::unzip(i, exdir = td) : error 1 in extracting from zip
    file</p>
    
    <p>3: In .registerS3method(fin[i, 1], fin[i, 2], fin[i, 3], fin[i, 4],  :
    restarting interrupted promise evaluation</p>
    
    <p>4: In get(method, envir = home) :   restarting interrupted promise
    evaluation</p>
    
    <p>5: In get(method, envir = home) : internal error -3 in R_decompress1</p>
  </blockquote>
  
  <p>Should I be using a different package?
  Thanks so much!
  D</p>