XML Parsing Error


#1

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


#2

Hi @nithin2304,

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


#3

Hi @akila93.

Thanks for your reply.

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

Thanks,
Nithin

Dummy.xaml (9.1 KB)


#4

Hey @nithin2304

Please find the attached Sample :slight_smile:

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

Regards…!!
Aksh


#5

Hey @aksh1yadav.

Thanks a lot. It worked.

Regards,
Nithin