Abirami Rajendran
asked on
XML Linq C#
Hello,
See below xml. Is it possible in linq to check if "errorCode" node exist under transactionItems-transacti on if so get the errorcode and message?
Thanks
See below xml. Is it possible in linq to check if "errorCode" node exist under transactionItems-transacti
Thanks
<root>
<header>
...
</header>
<transactionItems>
<transaction>
<id>123</id>
<name></name>
<errorCode>3456</errorCode>
<errorMessage>invalid id</errorMessage>
</transaction>
</transactionItems>
</root>
ASKER
Thanks the code works perfectly.
But if there is a xml namespace for the nodes <transactionItems xmlns="..."> & <transaction xmlns=".."> then it doesnt seem to work. Any idea?
But if there is a xml namespace for the nodes <transactionItems xmlns="..."> & <transaction xmlns=".."> then it doesnt seem to work. Any idea?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
NP. Glad to help = )
Open in new window