I need to get a value from an XML where the element might not exist within the XML (i.e. it is an optional element).
The function XML.GetValue returns an empty string in this case, which is fine, because I can check it and react accordingly. Nevertheless there is an error-entry in the log-file.
How could I avoid the error in the log-file? (It does not harm the program flow, but it is at least confusing, because in my case this is not an error situation but a regular use case.)
With best regards
Burkhard
The function XML.GetValue returns an empty string in this case, which is fine, because I can check it and react accordingly. Nevertheless there is an error-entry in the log-file.
How could I avoid the error in the log-file? (It does not harm the program flow, but it is at least confusing, because in my case this is not an error situation but a regular use case.)
With best regards
Burkhard
Comment