I want to edit the DNA sequence of DDBJ.
I can download it in xml format, but I am not familiar with the structure of xml, so
I don't understand some things.
The format of this xml file seems to contain different tags for the name and value of the information.
If it's an ordinary xml file (I checked it myself), it's like putting your name in the tag as an attribute, right?
Is there any merit of making it this way?
Also, I've only parsed when there are attributes in the tag, so
Could you tell me a good way to parse?
Python is assumed as the programming language.
I don't really understand the benefits of this format, but I might be able to parse the following code.Some of the files listed above have been saved to "dbbj_example.xml".
I used the etree module and xpath syntax of the lxml dictionary.
Example xpath syntax: https://docs.python.org/3/library/xml.etree.elementtree.html#elementtree-xpath
© 2023 OneMinuteCode. All rights reserved.