Extracting Data from XML file having tags in format <SAP:Retry>

Hi, I’ve this XML File which has tags as SAP:Stack and while I am passing value as below it’s giving me issue

Var = xDocError.Descendants(“SAP:Stack”).toList

Issue: Assign: The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name.

P.S.>> It has all tags in the same format only
for e.g. SAP:Retry; SAP:Stack etc

Please help! :slight_smile:

@anjasing
You need to handle the XML Namespaces as described here:

Below is the XML content. Can you please help here?

==================XML Content ===============

<SAP:Error xmlns:SAP=“http://sap.com/30” >

SAP:CategoryXIProxy</SAP:Category>

SAP:AdditionalText/

SAP:StackError during proxy </SAP:Stack>

SAP:RetryM</SAP:Retry>

</SAP:Error>

========================================
I’ve tried but it’s giving issue. If you can help here!

please share the XML as text file or use the </> from editor for properly sharing the snippet. Thanks

xml.txt (428 Bytes)

Thank you so much for helpingg…

As mentioned above:

  • Handle the XMLNamespace and we can retrieve e.g:

1 Like

Thank you so much…for the help … It really helped a lot. :slight_smile:

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