I have some trouble with parsing an XML file to a dataframe in R.
I have some XML code
<?xml version="1.0" encoding="windows-1251"?>
<dlc ac="ED29099541DB7B022D00E4179F00" softversion="0.2">
<statistics enterprise="Организация">
<shop Id="4" GUID="{F5D518E4-3C80-44E9-835B-D87CC35A7BDB}"
worktimefrom="2015-04-03 08:00:00" worktimeto="2015-04-03 20:00:00"
name="Объект" clientId="Client 1">
<sensor GUID="{63017726-D121-4EB3-A684-BC3D27AED119}" GCGUID="00000000-
0000-0000-0000-000000000000" Id="25" type="1" minortype="1" address="01"
name="Устройство" balance="0" devtype="1">
<stat datetime="2017-01-20 09:37:00" realin="1" realout="2" />
<stat datetime="2017-01-20 09:38:00" realin="1" realout="2" />
<stat datetime="2017-01-20 09:39:00" realin="1" realout="0" />
<stat datetime="2017-01-20 09:40:00" realin="0" realout="1" />
<stat datetime="2017-01-20 09:41:00" realin="1" realout="0" />
<stat datetime="2017-01-20 09:42:00" realin="1" realout="0" />
<stat datetime="2017-01-20 09:43:00" realin="1" realout="1" />
<stat datetime="2017-01-20 09:44:00" realin="0" realout="1" />
<stat datetime="2017-01-20 09:52:00" realin="1" realout="0" />
<stat datetime="2017-01-20 09:53:00" realin="0" realout="1" />
<stat datetime="2017-01-20 09:56:00" realin="1" realout="0" />
<stat datetime="2017-01-20 09:57:00" realin="0" realout="1" />
<stat datetime="2017-01-20 10:08:00" realin="0" realout="1" />
<stat datetime="2017-01-20 10:16:00" realin="0" realout="1" />
</sensor>
</shop>
I need to parse it into a dataframe in R, how do I do this ?