# XML

{% hint style="info" %}

#### **XML & XPath**

XML (eXtensible Markup Language) is a versatile format for structuring and storing data, widely used in various applications and data exchange scenarios. One of the powerful tools for working with XML is XPath (XML Path Language), which provides a way to navigate and extract specific data from XML documents.

XPath is a set of rules used for getting information from an XML document. In XPath, XML documents are treated as trees of nodes. There are several types of nodes; elements, attributes, and texts are some of them. As an example, document, and order are some of the nodes in the sample file.

Among the nodes there are relationships. A node has a parent, zero or more children, siblings, ancestors, and descendants depending on where the other nodes are in the hierarchy. To select a node in an XML document, you should use a path expression relative to a current node.
{% endhint %}

<figure><img src="/files/kdosGADZDEXvA4woBIto" alt="" width="375"><figcaption><p>X path</p></figcaption></figure>

{% embed url="<https://www.w3schools.com/xml/xpath_intro.asp>" %}
Link to Xpath tutorial
{% endembed %}

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.pentaho.com/pentaho-data-integration/data-integration/data-sources/flat-files/xml.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
