Why is null char prohibited even in CDATA partitions?

XML, Why is null char prohibited even in CDATA partitions?

It seems to be ending.

Any solution? Base64?

+3
source share
3 answers

You can find your answer in this previous question:

Why are “control” characters illegal in XML 1.0?

+2
source

Because it is no valid XML character , that is, it should cause a parsing error. This is probably due to historical reasons (strings with a null terminating character) and because of the XML-textual nature: anything that the Unicode-compatible editor can suppress is not recommended ...

+4

" ", . , - , \0 ​​ .

; , , \0 , . - .

& #...; XML 1.1, CDATA. XML 1.0 . , , , .

Base64?

Yes. But if you process mostly large chunks of binary files, encapsulation in XML is probably not a smart choice.

+1
source

Source: https://habr.com/ru/post/1702574/


All Articles