# Trouble working with idhs data (opening and ending tag mismatch)

**URL:** https://forum.ipums.org/t/trouble-working-with-idhs-data-opening-and-ending-tag-mismatch/5541
**Category:** GLOBAL HEALTH
**Created:** [December 1, 2023, 4:02pm UTC](https://forum.ipums.org/t/trouble-working-with-idhs-data-opening-and-ending-tag-mismatch/5541 "2023-12-01T16:02:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Stephanie\_Smittkamp](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Stephanie\_Smittkamp](https://forum.ipums.org/u/Stephanie_Smittkamp)
#### Post date: [December 1, 2023, 4:02pm UTC](https://forum.ipums.org/t/trouble-working-with-idhs-data-opening-and-ending-tag-mismatch/5541/1 "2023-12-01T16:02:29Z")

</div>

I have been having trouble interacting with idhs data via R. I’ve followed instructions that I’ve found on various IPUMS resources, and haven’t been able to problem solve yet.

My code looks like this:  
ddi ← read\_ipums\_ddi(“idhs\_00003.xml”)  
data ← read\_ipums\_micro(ddi)

and the error looks like this:  
Error in read\_xml.character(ddi\_file\_load, file\_select = NULL) :  
Opening and ending tag mismatch: meta line 13 and head [76]

---

<div class="post-metadata">

### Author: ![Ivan\_Strahof](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.ipums.org/ivan_strahof/32/626_2.png) [@Ivan\_Strahof](https://forum.ipums.org/u/Ivan_Strahof)
#### Post date: [December 1, 2023, 10:24pm UTC](https://forum.ipums.org/t/trouble-working-with-idhs-data-opening-and-ending-tag-mismatch/5541/2 "2023-12-01T22:24:27Z")

</div>

Hi Stephanie,

This error seems to be referring to a bad DDI file. As a first step, I recommend redownloading and replacing the DDI file, being sure to [follow the instructions here](https://tech.popdata.org/ipumsr/articles/ipums.html#downloading-from-microdata-projects). If that doesn’t work, I would resubmit the extract request by clicking on the _Revise_ button next to the extract [on the _My Data_ page](https://www.idhsdata.org/idhs-action/data_requests/download) and submitting with no changes to the request. You can then redownload and replace the DDI and data files from the new copy of the extract. If neither of these solutions work, please follow up here on the forum or email us at [ipums@umn.edu](mailto:ipums@umn.edu) and we can help you troubleshoot further.
