我有一個XML文件是這樣的:的MySQL插入數據
<dbReference type="PM" id="17224074"/>
<dbReference type="DOI" id="10.1186/bcr1637"/>
</citation>
<scope>VARIANTS ILE-282 AND ASN-777</scope>
</reference>
<comment type="function">
<text evidence="24">Calcium.</text>
</comment>
<comment type="function">
<text evidence="24">Has a strong inhibitory effect on APP C99 and C83 production.</text>
</comment>
<comment type="subunit">
<text evidence="5 13">Homodimer; disulfide-linked.</text>
</comment>
<comment type="interaction">
<interactant intactId="EBI-727477"/>
<interactant intactId="EBI-7644904">
<id>Q9JIY2</id>
<label>Cbll1</label>
</interactant>
<organismsDiffer>true</organismsDiffer>
<experiments>21</experiments>
</comment>
我想僅提取
<comment type="function">...</comment>
在這個例子是信息:「鈣」。 AND'作爲對APP C99和C83生產的強烈抑制作用。'
我有這個表,我要保存的數據:
CREATE TABLE IF NOT EXISTS INFORMATION (id varchar(255) NOT NULL, name varchar(255), entry varchar(255), comment longtext, PRIMARY KEY (id));
在那裏我會救「鈣」。 AND'作爲對APP C99和C83生產的強烈抑制作用。'在名爲'comment'的列中。 我以爲我可以直接從XML插入這個信息到LOAD XML表,但我的XML文件有太多不同的領域。 我該怎麼做?我是否必須首先從xml中提取數據,然後將其插入表中?