new_contents: 
  
  import xmltodict
  import pandas as pd
  
  
  class DovTimeSeries(object):
  
      def __init__(self, xml_doc):
          with open(xml_doc) as fd:
              doc = xmltodict.parse(fd.read())
              self.peilmetingen = self._get_peilmetingen_df(doc)
              self.observaties = self._get_observaties_df(doc)
              self.metadata_locatie = doc["ns2:dov-schema"]["grondwaterlocatie"]
              self.metadata_filters = self._get_filter_metadata(doc)
  
      @staticmethod
      def _get_filter_metadata(doc):
          """"""
          filter_info = {}
          for filterd in doc["ns2:dov-schema"]['filter']:
              filter_info[filterd["identificatie"]] = filterd
          return filter_info
  
      @staticmethod
      def get_peilmetingen(doc):
          """Generator to extract the individual measurements from the XML
          export"""
          for filterm in doc["ns2:dov-schema"]['filtermeting']:
              for meting in filterm['peilmeting']:
                  yield (filterm['grondwaterlocatie'],
                         filterm['filter']['identificatie'],
                         meting['datum'],
                         meting['diepte'],
                         meting['methode'],
                         meting['betrouwbaarheid'])
  
      def _get_peilmetingen_df(self, doc):
          """"""
          doc_df = pd.DataFrame(list(self.get_peilmetingen(doc)),
                                columns=["grondwaterlocatie",
                                         "filternummer",
                                         "datum",
                                         "diepte",
                                         "methode",
                                         "betrouwbaarheid"])
          doc_df["datum"] = pd.to_datetime(doc_df["datum"])
          doc_df["diepte"] = pd.to_numeric(doc_df["diepte"])
          doc_df = doc_df.set_index("datum")
          return doc_df
  
      @staticmethod
      def get_observaties(doc):
          """Generator to extract the individual observations from the XML
          export"""
          for filterm in doc["ns2:dov-schema"]['filtermeting']:
              for watermonster in filterm['watermonster']:
                  for observatie in watermonster['observatie']:
                      yield (filterm['grondwaterlocatie'],
                             filterm['filter']['identificatie'],
                             watermonster['identificatie'],
                             ' '.join([watermonster['monstername']['datum'],
                                       watermonster['monstername']['tijd']]),
                             observatie['parameter'],
                             observatie['waarde_numeriek'],
                             observatie['eenheid'],
                             observatie['betrouwbaarheid'])
  
      def _get_observaties_df(self, doc):
          """"""
          doc_df = pd.DataFrame(list(self.get_observaties(doc)),
                                columns=["grondwaterlocatie",
                                         "filternummer",
                                         "monsternummer",
                                         "datum",
                                         "parameter",
                                         "waarde",
                                         "eenheid",
                                         "betrouwbaarheid"])
          doc_df["datum"] = pd.to_datetime(doc_df["datum"])
          doc_df["waarde"] = pd.to_numeric(doc_df["waarde"])
          return doc_df
  
  
subject: add class based dov dframe representation