--- title: "select nodes from XML/DOM to List()" slug: "xml-select-nodes" updated: 2026-08-17T13:16:26Z published: 2026-08-17T13:16:26Z canonical: "docs.lobstersoftware.com/xml-select-nodes" --- > ## 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. # select nodes from XML/DOM to List() This function stores the XPath expression from the XML/DOM object **a** in a list **c** from the root directory on up to the specified XPath expression **b**. You can optionally create a concatenated XPath expression out of values **b** and **d**. It is also possible to set specific namespaces using a map, which can be defined with parameter **e**. Existing namespaces with the same name will be replaced. The function returns the number of nodes in the result set. ## Parameters | Parameter | Description | | --- | --- | | a | Name of XML/DOM object. | | b | XPath expression (selection of a specific set of nodes). | | c | Name of the list. | | d | Optional XPath expression. | | e | Name of the map for the namespace management. | ## Example The following XML file is used. ```Invoice 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 ``` For each user, we want the customer number and the item number that does not begin with "DE". ![images/download/attachments/212894252/858-version-1-modificationdate-1750750243635-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/858-version-1-modificationdate-1750750243635-api-v2.png) In the calculation field "loadXML" the list is issued (separated by "|") with all XPath expressions to value "user". In the first row of the table below, the parameters for these functions are listed. The node "user" drags on the list "list_user_data". In the field "xpath" of the respective XPath expression is listed for each node. In the fields "customer_number" and "article_id" the evaluated data is issued. In addition, the value of the field "article_id", are stored in a list "list_article_id" with the function described here. The XPath expression is obtained from the parameter **d** (in this case "/Invoice/user") and the second parameter specified below **c** ("/order[article_id>0]/article_id") composed. The set parameters can be found in row two in the table. | Parameter a | Parameter b | Parameter c | Parameter d | Result | | --- | --- | --- | --- | --- | | xml_Invoice | //user | list_user_data | | 2 | | xml_Invoice | /order[article_id>0]/article_id | list_article_id | xpath | 2 |