xml_escaping.txt 893 B

123456789101112131415161718192021222324252627
  1. The output from tools run by Raptor will typically not be XML, so Raptor wraps
  2. all tool output in CDATA sections. For example:
  3. <![CDATA[
  4. + python write_my_code.py
  5. writing MyClass.hxx
  6. writing MyClass.cpp
  7. ]]>
  8. The text between "[CDATA[" and "]]" is arbitrary, however there are some
  9. characters which are not permitted and will be rejected as bad XML by
  10. many XML parsers. Therefore Raptor will also translate these invalid
  11. characters into strings which are valid. For example, control characters
  12. in the ASCII range 0-31 are translated into "&#x00;", "&#x01;", "&#x02" etc.
  13. (except for CTRL-I, CTRL-J and CTRL-M which are allowed).
  14. In general, tools should not be writing non-printable characters to stdout
  15. and stderr anyway. But if they do, then at least you will see something
  16. sensible in the Raptor logs. For example,
  17. <![CDATA[
  18. + python hack_my_code.py
  19. error: don't hack it you &#xff;
  20. ]]>