Reading UBL cac, cbc namespaces

Hello guys,
I am trying to reading xml folder and taking the tax amount and transfering to excel.


Any help will be appreciated

Have a look here, on how to handle namespaces

Thanks for help, trying immediately.

Other examples as well:

and more are additional available

Thank you for your help.
I need specific item like “cbc:InvoicedQuantity”
How can I achieve?

the provided resource would clear it.

  • defines namespace variables
  • implement the extraction

Otherwise share your XML with us, in case of further help is needed


A rough Quick implementation:

 xDoc.Root.Descendants(xnsCAC + "InvoiceLine").First().Element(xnsCBC + "InvoicedQuantity").Value
 "4.00000"
 xDoc.Root.Descendants(xnsCAC + "InvoiceLine")(1).Element(xnsCBC + "InvoicedQuantity").Value
 "13.00000"
 xDoc.Root.Descendants(xnsCAC + "InvoiceLine").Count
 2

However go through the provided resources and you will get implemented your case with this help very quickly

1 Like

thanks for help :smile:

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