XML Parsing Error

Hey there,

Am trying to read the contents of a XML using tags. I uses read Text file to read the XML and Deserialized it into a XDocument.

Then, I tried to read the Attribute as
"ClinicalDocument: "+xmlDoc.Element(“ClinicalDocument”).Attribute(“xmlns”).Value

where am trying the read the attitubute value of “xmlns”. Attached Screenshot of XML for ref.

I get an Null Reference Error for this. Can anyone pls help me to sort out the issue.

Error

@arivu96 @aksh1yadav

Regards,
Nithin

Hi @nithin2304,

Your syntax is correct, can you check the
1.Read text file
2.Deserialize XML
did you passed correct variable.

Hi @akila93.

Thanks for your reply.

Yes I did. Attached dummy.xaml for your reference.

Thanks,
Nithin

Dummy.xaml (9.1 KB)

Hey @nithin2304

Please find the attached Sample :slight_smile:

XMl Node Attribute Get - Akshay Yadav.xaml (6.2 KB)

Regards…!!
Aksh

Hey @aksh1yadav.

Thanks a lot. It worked.

Regards,
Nithin

Hi
Please find the below video on XML parsing