oa_gateway_uci::xml

Function parse_text

Source
fn parse_text(type_name: &str, text: &str) -> Simple
Expand description

Carry XML text as the JSON shape its declared type calls for.

Text that does not fit the type is carried as written rather than coerced. Reading yes in an xs:boolean as false would hand a subscriber a value no one sent, and a value the gateway invented is worse than one it reports — validation is where a value that does not fit its type gets named.