Extract XML DATA

Hi Team,

Can you please help me to get the “relatedOrderIds” from below XML string
attached XML dataXML2.txt (1.3 KB)

Hi…@Shaik.Yezdani - Would like to use RegEx or XML Parsing?

@prasath17 anything is fine for me

@Shaik.Yezdani - Here you go…

RegEx Pattern: RegEXPattern.txt (86 Bytes)

In the above screenshot, you can see the matched string at the bottom…

1 Like

@prasath17 Thanks once again. But what if we have more than two id’s at one place

1 Like

@Shaik.Yezdani…that will also work, I have tested that before sending … please try that and let me know.

1 Like

@Shaik.Yezdani - I spoke too soon, above given pattern doesn’t work if its more than 2 ids…

Just change the middle pattern to : [0-9,\s]+

Explanation: This pattern would any digits from 0-9 comma and Space(\s) …

Update: Since there is an extra " inside the pattern…you have handle as shown below


Output: image

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.