Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- readFile = (root) ->
- dataset = root.find('dataset')
- info = dataset.find('metaInformation/processInformation')
- reference = info.find('referenceFunction').attrib
- process =
- id : root.find('dataset').attrib.number
- name : reference.name
- category : reference.category
- unit : reference.unit
- geography : info.find('geography').attrib.location
- description : reference.generalComment
- edges : []
- for exchange in dataset.findall('flowData/exchange')
- exchange = exchange.attrib
- process.edges.push
- id : exchange.number
- name : exchange.name
- category : exchange.category
- subCategory : exchange.subCategory
- unit : exchange.unit
- geography : exchange.location
- description : exchange.generalComment
- return process
Add Comment
Please, Sign In to add comment