여러 XML 파일을 열/테이블로 구문 분석하려고하지만 일부 XML은 다른 데이터를 포함하고 일부는 중요하지 않지만 다른 데이터는 중요합니다.python을 사용하여 xml 데이터를 열로 구문 분석합니다.
즉 (XML 데이터) :
<setId root="ABD6ECF0-DC8E"/>
<component>
<section>
<id root="F08C6A14-8165-458A-BDC8-0B5878EB814D"/>
<code code="34069-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOW SUPPLIED SECTION"/>
<title mediaType="text/x-hl7-title+xml">HOW SUPPLIED</title>
<text>
<paragraph>RENESE (polythiazide) Tablets are available as:</paragraph>
<paragraph>1 mg white, scored tablets in bottles of 100 (NDC 0069-3750-66).</paragraph>
<paragraph>2 mg yellow, scored tablets in bottles of 100 (NDC 0069-3760-66).</paragraph>
<paragraph>4 mg white, scored tablets in bottles of 100 (NDC 0069-3770-66).</paragraph>
</text>
<effectiveTime value="20051214"/>
</section>
</component>
<component>
<section>
<id root="42CB916B-BB58-44A0-B8D2-89B4B27F04DF"/>
<code code="34089-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="DESCRIPTION SECTION"/>
<title mediaType="text/x-hl7-title+xml">DESCRIPTION</title>
<text>
<paragraph>Renese<sup>®</sup> is designated generically as polythiazide, and chemically as 2<content styleCode="italics">H</content>-1,2,4-Benzothiadiazine-7-sulfonamide, 6-chloro-3,4-dihydro-2-methyl-3-[[(2,2,2-trifluoroethyl)thio]methyl]-, 1,1-dioxide. It is a white crystalline substance, insoluble in water but readily soluble in alkaline solution.</paragraph>
<paragraph>Inert Ingredients: dibasic calcium phosphate; lactose; magnesium stearate; polyethylene glycol; sodium lauryl sulfate; starch; vanillin. The 2 mg tablets also contain: Yellow 6; Yellow 10.</paragraph>
</text>
<effectiveTime value="20051214"/>
</section>
</component>
<component>
<section>
<manufacturedProduct>
<manufacturedMedicine>
<code code="0069-3750" codeSystem="2.16.840.1.113883.6.69" codeSystemName="FDA" displayName="NDC"/>
<name>Renese</name>
<formCode code="C42998" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="TABLET"/>
<manufacturedProduct/>
<manufacturedMedicine/>
나는 최종 결과 (setID, 설명에서와 같이 이름이 열 이름으로) 이런 식으로 할 것을 권장합니다
는
을 setIDABD6ECF0-DC8E
설명
Renese는
있는 폴리 일반적으로 지정하고, 화학적 등 2H-1,2,4- 벤조 티아 디아 -7- 술폰 아미드, 6- 클로로 3,4- 디 히드로 -2- 메틸 -3 - [[ (2,2,2- 디 플루오로 에틸) 티오] 메틸] -, 1,1- 디옥 시드를 포함한다. 백색 결정 성 물질로 물에는 용해되지 않지만 알칼리성 용액에는 쉽게 용해된다. .
이름
Renese