RadhaKrishnaKiJaya
asked on
Check a Node in XML Doc in C#
Hello Experts,
I have an XML Document named ErrorRowsXml as below. I need to check the existence of the node ERROR_DETAIL in C#. How can I do that.
Thank you very much in advance.
- <ERROR_REPORT>
- <ERRORS STATUS="TRUE">
<ERROR CODE="" DESC="" />
</ERRORS>
<ERROR_DETAIL FIELD_NO="" ERROR_MESSAGE="" FIELD_NAME="" />
</ ERROR_REPORT >
I have an XML Document named ErrorRowsXml as below. I need to check the existence of the node ERROR_DETAIL in C#. How can I do that.
Thank you very much in advance.
- <ERROR_REPORT>
- <ERRORS STATUS="TRUE">
<ERROR CODE="" DESC="" />
</ERRORS>
<ERROR_DETAIL FIELD_NO="" ERROR_MESSAGE="" FIELD_NAME="" />
</ ERROR_REPORT >
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Chris Stanyon and zc2,
Thank you for your time and help.
I am able to check it. Now, once checked, if null I need to add the node. How can I do that?
Thank you
Thank you for your time and help.
I am able to check it. Now, once checked, if null I need to add the node. How can I do that?
Thank you
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thank you Chris Stanyon and zc2 for your time and help. It worked like charm.
Open in new window