How can I parse nodes and edges information from XML file
조회 수: 2 (최근 30일)
이전 댓글 표시
I am new in xml file in matlab. I want to read a xml file (network) with nodes and edges, in order to get the following info:
The node id, label, Human Readable Label, uniprot values The edge id, label, source, target Here is the xml file:
</node>
<node id="1696" label="Q13418">
<att name="shared name" value="Q13418" type="string"/>
<att name="name" value="Q13418" type="string"/>
<att name="selected" value="0" type="boolean"/>
<att name="Taxonomy ID" value="9606" type="string"/>
<att name="Taxonomy Name" value="human" type="string"/>
<att name="Human Readable Label" value="ILK" type="string"/>
<att name="uniprotkb_accession" value="Q13418" type="string"/>
<att name="uniprot" type="list">
<att name="uniprot" value="Q68DZ3" type="string"/>
<att name="uniprot" value="B7Z1I0" type="string"/>
<att name="uniprot" value="ILK-1" type="string"/>
<att name="uniprot" value="ILK-2" type="string"/>
<att name="uniprot" value="B7Z418" type="string"/>
<att name="uniprot" value="ILK2" type="string"/>
<att name="uniprot" value="ILK" type="string"/>
<att name="uniprot" value="Q13418" type="string"/>
<att name="uniprot" value="ILK1" type="string"/>
<att name="uniprot" value="59 kDa serine/threonine-protein kinase" type="string"/>
<att name="uniprot" value="D3DQU0" type="string"/>
<att name="uniprot" value="p59ILK" type="string"/>
<att name="uniprot" value="P57043" type="string"/>
</att>
<att name="psi-mi" type="list">
--------
--------
--------
</node>
</edge>
<edge id="1695" label="Q9NVD7 (EBI-6690276) P48059" source="1689" target="1694" cy:directed="1">
<att name="shared name" value="Q9NVD7 (EBI-6690276) P48059" type="string"/>
<att name="shared interaction" value="EBI-6690276" type="string"/>
<att name="name" value="Q9NVD7 (EBI-6690276) P48059" type="string"/>
<att name="selected" value="0" type="boolean"/>
<att name="interaction" value="EBI-6690276" type="string"/>
<att name="Author" type="list">
<att name="Author" value="Zhang et al. (2002)" type="string"/>
</att>
<att name="Primary Interaction Type" value="association" type="string"/>
<att name="Interaction Type" type="list">
<att name="Interaction Type" value="association" type="string"/>
</att>
-----------
-----------
</graphics>
</edge>
I used xml-read function to read the file. Unfortunately I got the information like this: Any help will be highly appreciate
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!