# BDPReader — Converts BDP in XML format to in-memory BDP object.¶

This module defines the BDPReader class.

class admit.xmlio.BDPReader.BDPReader(file=None)[source]

Class to read in a bdp file (xml style) and convert it to a BDP object in memory. Only the name of the bdp file (including any relative or absolute path) needs to be specified. The given file will be passed to the AdmitParser where it will be parsed. The resulting data will be inserted into a BDP object of the appropriate type (type is determined by the contents of the bdp file). The BDP object is the returned.

Parameters: file : str File name (including any relative or absolute path) of the bdp file to be parsed and converted to a BDP object. Default : None.

Attributes

 File name (including any relative or absolute path) of the bdp file to be parsed and converted to a BDP object.

Methods

 read([file]) Method to convert a bdp file to a BDP object.
read(file=None)[source]

Method to convert a bdp file to a BDP object. Only the file name (including relative or absolute path) needs to be given. The file is then parsed and the data inserted into the appropriate BDP object. The type of BDP is determined from the data in the bdp file itself. The resulting BDP object is returned.

Parameters: file : str File name (including any relative or absolute path) of the bdp file to be parsed and converted to a BDP object. Default : None BDP object of appropriate type based on the given input file.