The Osmium Library has extensive support for all types of OSM entities:
nodes, ways, relations, and changesets. It allows reading from and wri-
ting to OSM files in XML, PBF, and several other formats, including
change files and full history files. 
