0

I have trouble reading & using a strange kind of xml file. It's an .eml file (election markup language), which is a version of XML. The content looks like this:

<ManagingAuthority>
<AuthorityIdentifier Id="0362">Amstelveen</AuthorityIdentifier>
<AuthorityAddress/>
</ManagingAuthority>
<kr:CreationDateTime>2017-03-16T04:07:00.867</kr:CreationDateTime>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<Count>
<EventIdentifier/>
<Election>
<ElectionIdentifier Id="TK2017">

I have tried xml package but get the error "Error: XML content does not seem to be XML". Anyone ideas how to read this kind of file into R and parse the content?

nsnvc
  • 43
  • 5
  • Why is there a R tag? – Christoph Aug 07 '17 at 07:53
  • Because I'm trying to do this in R. – nsnvc Aug 07 '17 at 08:20
  • Please read [(1)](http://stackoverflow.com/help/how-to-ask) how do I ask a good question, [(2)](http://stackoverflow.com/help/mcve) How to create a MCVE as well as [(3)](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example#answer-5963610) how to provide a minimal reproducible example in R. Then edit and improve your question accordingly. I.e., abstract from your real problem... – Christoph Aug 07 '17 at 09:32
  • Is that the actual file? Doesn't seem to validate properly. `Count`, `Election` etc don't have matching closing tags – ekstroem Aug 07 '17 at 09:56
  • it's just an excerpt. Every tag has a coresponding closing tag. – nsnvc Aug 07 '17 at 11:19

0 Answers0