[dvblast-devel] Badly formed xml output

cmassiot at openheadend.tv cmassiot at openheadend.tv
Thu Oct 27 13:32:00 CEST 2016


Le 27.10.2016 12:14, Zoran Turalija a écrit :

>> ParseError: not well-formed (invalid token): line 4, column 135
> 
> Offender is ampersand character that has special meaning in XML. Beside
> ampersand, there are greater-than, less-than, apostrophe, quote etc. 
> that
> also have special meaning in XML. Therefore, they must be substituted 
> with
> character references when used as data in XML. In this case, ampersand 
> must
> be substituted with & in order to comply to XML standard.
> 
> Basically, code that writes data of selector_byte_txt must substitute 
> all XML
> special characters before sending data to XML output generator.

We have a dvb_string_xml_escape function that can escape those 
characters. However, considering that the value is not meant to be 
user-readable anyway, we could avoid printing it in the first place. Is 
anyone relying on that?


More information about the dvblast-devel mailing list