> For the complete documentation index, see [llms.txt](https://fennaf.gitbook.io/dataprocessing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fennaf.gitbook.io/dataprocessing/load-data-1/untitled.md).

# XML

eXtensible Markup Language

XML is another common structured data format supporting hierarchal nested data with metadata. XML and HTML are structured similar but XML is more general. An example of XML is given below:

```markup
<CATALOG>
<PLANT>
        <COMMON>Bloodroot</COMMON>
        <BOTANICAL>Sanguinaria canadensis</BOTANICAL>
        <ZONE>4</ZONE>
        <LIGHT>Mostly Shady</LIGHT>
        <PRICE>$2.44</PRICE>
        <AVAILABILITY>031599</AVAILABILITY>
</PLANT>
```

## Load XML <a href="#load-xml" id="load-xml"></a>

We can load the data by the `read_xml()` method. It parses the information directly in a DataFrame format

```python
import pandas as pd
df = pd.read_xml('https://bioinf.nl/~fennaf/DSLS/plants.xml')
df.head()
```

![](https://3745838051-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ml0CVAxeQk2qLKeK6ki%2F-Ml0gG6N3K3dbcHM4YHl%2F-Ml0oBdhp2jkzQYyC6GX%2FScreenshot%202021-10-02%20at%2018.22.35.png?alt=media\&token=84b38ccd-ef3f-4f76-b825-56a2119932aa)
