Question

Get node by Id XML


Badge +4

Hello friends,

I need to get several fields from an XML based on the id=voucher, how can I do it? I need this to work for N types of XML that can be structured like this:

invoice or
authorization/voucher/invoice

All XML have invoice with has id=voucher (<invoice id="voucher" version="1.1.0">) but may or may not have roots as shown above. How could I do it?

Format 1

 

Format 2

For example, I need to get razonSocial node


3 replies

Userlevel 7
Badge +13

Hi @Midna08 ,

 

If you want to get a single node, you can follow the below by using the XML: Get single node action. Specify the same in the Xpath Expression.

//InfoTribtaria/razonSocial 

 

If you need to loop through multiple nodes, you may refer the below Tutorial.

 

 

Badge +4

Hi @Midna08 ,

 

If you want to get a single node, you can follow the below by using the XML: Get single node action. Specify the same in the Xpath Expression.

//InfoTribtaria/razonSocial 

 

If you need to loop through multiple nodes, you may refer the below Tutorial.

 

 

Thank you, I’m did that but I have this error:

 

 

Userlevel 7
Badge +13

Hi @Midna08 ,

 

If you want to get a single node, you can follow the below by using the XML: Get single node action. Specify the same in the Xpath Expression.

//InfoTribtaria/razonSocial 

 

If you need to loop through multiple nodes, you may refer the below Tutorial.

 

 

Thank you, I’m did that but I have this error:

 

 

 

 

I am getting the output with the same. Below is FYI.

 

 

Reply