--- title: "get value from XML()" slug: "xml-get-value" updated: 2026-08-17T13:09:01Z published: 2026-08-17T13:09:01Z canonical: "docs.lobstersoftware.com/xml-get-value" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # get value from XML() This function returns the first result value of the XPath expression **b** on the XML object **a**. Optionally, an XPath expression can be created from the values **b** and **c**. Also, it is possible to set specific namespaces using a map, which can be defined in parameter **d**. Existing namespaces with the same name will be replaced. If a list name is specified in **e**, all values returned by the XPath query are added to the list. The first value of the XPath query is returned. Values previously stored in the list are not deleted. A default list name is not used if no list name is provided. ## Parameters | Parameter | Description | | --- | --- | | a | Name of XML object. You can obtain such an object by using the functions [parse XML()](/v1/docs/en/xml-parse-xml) or [convert JSON to XML()](/v1/docs/en/basic-json-to-xml). | | b | XPath expression (Selection of a specific set of nodes). | | c | (optional) XPath expression. | | d | (optional) Name of the map for the namespace management. | | e | (optional) Name of the list to store XPath query results into. Default: empty. | ## Example 1 Given is the following XML file, which we first read in under the name "xml_Invoice" with function "parse XML()". We can then use this name in parameter **a** of this function here. ```Invoice INV_12345 2014-05-21T15:25:11Z 12345 Gustav Thalmeier Treuchtlingen 15.07.1981 DE459363258 1 17,98 459363298 1 4,99 85639 Henriette Michlmeier Breckerfeld 04.12.1975 DE459362358 1 199,59 459363258 3 7,99 DE459363258 1 14,99 ``` If a list name is specified in parameter **e**, we assume the list to be empty. | Parameter a | Parameter b | Parameter c | Parameter d | Parameter e | Result | Elements of the list | | --- | --- | --- | --- | --- | --- | --- | | xml_Invoice | /NonExist | | | | | | | xml_Invoice | /Invoice[1]/Invoice_date | | | | 2014-05-21T15:25:11Z | | | xml_Invoice | /Invoice_number | /Invoice[1] | | | INV_12345 | | | xml_Invoice | /Invoice[1]/Customer[1]/Customer_number | | | | 12345 | 12345 | | xml_Invoice | /Invoice[1]/Customer[2]/Customer_number | | | | 85639 | | | xml_Invoice | //Customer_number | | | | 12345 | | | xml_Invoice | //Customer_number | | | custList | 12345 | 12345, 85639 | ## Example 2 Given is the following XML file, which we first read in under the name "xml_ConversionRate" with function "parse XML()". We can then use this name in parameter **a** of this function here. ```ConversionRate     309.09   22.15   2017-04-03   ``` > [!NOTE] > **NOTE:** > > To be able to use the value of tag "ConversionRateResult", a map with the namespace "dw_dflt=http://www.webserviceX.NET/" has to be defined. To find results, the XPath expression has to use the respective prefix. The map can be used to simplify namespace names. Assume the following map for the examples: dw_dflt=http://www.webserviceX.NET/ cr=http://www.example.com s=http://www.w3.org/2003/05/soap-envelope | **Parameter a** | xml_ConversionRate | | --- | --- | | **Parameter b** | /NonExist | | **Parameter c** | | | **Parameter d** | | | **Parameter e** | | | **Result** | | | **Elements of the list** | | | **Parameter a** | xml_ConversionRate | | --- | --- | | **Parameter b** | /Envelope[1]/Body[1]/ConversionRateResponse[1]/ConversionRateResult | | **Parameter c** | | | **Parameter d** | | | **Parameter e** | | | **Result** | Empty (see note above) | | **Elements of the list** | | | **Parameter a** | xml_ConversionRate | | --- | --- | | **Parameter b** | /soap:Envelope[1]/soap:Body[1]/ConversionRateResponse[1]/ConversionRateResult | | **Parameter c** | | | **Parameter d** | | | **Parameter e** | | | **Result** | Empty (see note above) | | **Elements of the list** | | | **Parameter a** | xml_ConversionRate | | --- | --- | | **Parameter b** | /soap:Envelope[1]/soap:Body[1]/dw_dflt:ConversionRateResponse[1]/dw_dflt:ConversionRateResult[1] | | **Parameter c** | | | **Parameter d** | map_namespaces | | **Parameter e** | | | **Result** | 309.09 | | **Elements of the list** | | | **Parameter a** | xml_ConversionRate | | --- | --- | | **Parameter b** | //dw_dflt:ConversionRateResult | | **Parameter c** | | | **Parameter d** | map_namespaces | | **Parameter e** | | | **Result** | 309.09 | | **Elements of the list** | | | **Parameter a** | xml_ConversionRate | | --- | --- | | **Parameter b** | /dw_dflt:ConversionRateResponse[1]/dw_dflt:ConversionRateResult | | **Parameter c** | /soap:Envelope[1]/soap:Body[1] | | **Parameter d** | map_namespaces | | **Parameter e** | list_ConversionRate | | **Result** | 309.09 | | **Elements of the list** | 309.09,22.15 | | **Parameter a** | xml_ConversionRate | | --- | --- | | **Parameter b** | /soap:Envelope[1]/soap:Body[1]/dw_dflt:ConversionRateResponse[1]/conversionrate:Date[1] | | **Parameter c** | | | **Parameter d** | | | **Parameter e** | | | **Result** | 2017-04-03 | | **Elements of the list** | | | **Parameter a** | xml_ConversionRate | | --- | --- | | **Parameter b** | /s:Envelope[1]/s:Body[1]/dw_dflt:ConversionRateResponse[1]/cr:Date | | **Parameter c** | | | **Parameter d** | map_namespaces | | **Parameter e** | | | **Result** | 2017-04-03 | | **Elements of the list** | | Please note that in the case of XML files with namespaces, the namespace must also be specified in the XPath expression. XML (Extensible Markup Language) is a structured text format for storing and exchanging data. Content is enclosed within freely definable tags such as `<order>`. XML is human-readable, machine-processable, and platform-independent. In the Lobster Data Platform, you can receive, parse, and generate XML data.