[studxml-users] Suggestion to extend the attribute template per compiler definiton

Boris Kolpackov boris at codesynthesis.com
Mon Dec 12 11:16:08 EST 2016


Hi Omar,

Omar Medina <omar.medina at web.de> writes:

> my suggestion (below) involves a long known use-case, that impacts
> developers, when they are handling the read hexadecimal values from
> XML-data.

I've been dealing with XML parsing for over 10 years now and it's
the first time I encounter this "long known use-case" ;-).

Besides, the problem with your approach is that not all strings
that start with 0x are necessarily hex-encoded numbers. So we
cannot embed such an assumption inside libstudxml.

The good news is, the library allows you to provide a custom parsing
specialization (via value_traits). So if in your application you can
assume that anything that starts with 0x is a hex-number, then you
can do it.

Boris



More information about the studxml-users mailing list