[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [xml] xmlEncodeSpecialChars and carriage reurn / CRLF / 0x0D 0x0A / \r\n / 13,10



So, this mean, what i cant place "&#xx;" in content manually ? Yes, i'm understand, what in Microsoft peoples have tourble with standards, this can good see on IE.
But i have problem and with this situation i can't understand why i can't place manual escaped content in my xml file, if this don't break standard ?

>   From an XML perspective escaping of code point 10 is needed only in attribute
> value because of the rules I pointed in the XML spec. You need this to avoid
> attribute normalization that the XML parser may do in attribute values. For
> the values in element content there is no need to do that escaping so libxml2
> does not do it:
> 
> paphio:~/XML -> cat test.xml
> <foo attr="a&#10;b">a&#10;b</foo>
> paphio:~/XML -> xmllint test.xml
> <?xml version="1.0"?>
> <foo attr="a&#10;b">a
> b</foo>
> paphio:~/XML -> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]