Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Lars Skjærlund
Posts: 5
Location: Denmark


Wed Jul 07, 2010 11:10 am


I've created a .Net program that extracts some data from a database and creates an XML file of the content.

Unfortunately, some of the textfields has linebreaks which MS .Net encodes as &#xC;. oXygen 10.3 complains that this is an invalid XML character - but it is not illegal according to section 4.1 of the W3C specification?

Would this be a bug in the validator?

Site Admin
Posts: 2100

Re: &#xC;

Wed Jul 07, 2010 11:30 am

The section 4.1 from the XML 1.0 spec, Character and Entity References
refers also to the well-formedness constraint Legal Character that says

"Characters referred to using character references MUST match the production for Char."

pointing to

[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

and, as you can see #xC is not part of the Char production.

On the other hand, #xC is allowed in XML 1.1, see

[2] Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

So, to conclude, as your document is XML 1.0 it does not allow the #xC character but if you specify <?xml version="1.1"?> in the XML header of your file then the #xC character is allowed.

Best Regards,
George Cristian Bina
Lars Skjærlund
Posts: 5
Location: Denmark

Re: &#xC;

Wed Jul 07, 2010 11:37 am

Hi George,

Well - what can I say? Amazing - I've never seen this level of support before... :D


Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 2 guests