Parsing - Applications

From Overdensity
Jump to: navigation, search

Application Example 1

https://en.wikibooks.org/wiki/XML_-_Managing_Data_Exchange/Parsing_XML_files

Python classes / functions to parse Clinical Trial data in the form of XML returned from clinicaltrials.gov. Older version also allows for parsing of Json returned from Lilly COI API.

ClinicalTrialsParser Python classes / functions to parse Clinical Trial data in the form of XML returned from clinicaltrials.gov. Older version also allows for parsing of Json returned from Lilly COI API.

Workflow at the moment:

Make a list of IDs to focus on

From the simple txt file with the 10 (or more) we want to focus on Get the studies listed on the ID list

Run get_key_studies.py This will save the study XML into the ct_xml folder Convert the raw XML to raw JSON, add geolocation data

run xml_to_json.py Convert the raw XML into osf JSON

use clinical_trials_parser.py For the future, when we'd like to update every day...

Get a list of studies that have been updated since yesterday

Run update_key_studies.py saves a list called updated_ids.txt Run get_key_studies again with the updated_ids.txt list?

What do we do with the updated files? Rename and move into archive?? https://github.com/pjfan/ClinicalTrialsParser

PHP Application

XML Parser

XMLReader

yo

https://stackoverflow.com/questions/3577641/how-do-you-parse-and-process-html-xml-in-php?rq=1