V
V
Vladimir Korotenko2020-06-28 17:52:52
C++ / C#
Vladimir Korotenko, 2020-06-28 17:52:52

Processing xml attributes, how to organize without intermediate code?

There is an example code
<object Id=“52” />

Where the id attribute can be a number , zero, suddenly a string. I would like to get by with a standard serializer handler, or write your own. Let's say it gives out 0, an integer value, and some kind of abusive handler if it fails. According to the logic of the application, such garbage happens, but about 1 time in 40,000. It's not that I'm against extra classes, but I would like to sail errors in one place

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Yudakov, 2020-06-29
@firedragon

5ef96b15ec2a6061332469.png
No class model is needed here.
Especially if we have information garbage at the entrance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question