R-XML pulling nodes into matrix/DF accounting for missing nodes
I am fairly new to using R and very new to using the XML package and xpath. I need to pull four elements from an xml file that looks like this (except that I have trimmed off a lot of other xmlnodes to simplify it here): <?xml version="1.0" encoding="utf-8"?> <iati-activities version="1.03" generated-datetime="2015-07-07T16:49:09+00:00"> <iati-activity last-updated-datetime="2014-08-11T14:36:59+00:00" xml:lang="en" default-currency="EUR"> <iati-identifier>NL-KVK-41160054-100530</iati-identifier> <title>Improvement of basic health care</title> <reporting-org ref="NL-KVK-41160054" type="21"