[Home] [By Thread] [By Date] [Recent Entries]

  • From: Roger L Costello <costello@m...>
  • To: "xml-dev@l..." <xml-dev@l...>
  • Date: Thu, 17 Mar 2022 11:25:26 +0000

In response to my question:

1. Why is it that < is illegal but the equivalent hex
and decimal character entities are legal?

Liam Quin answered:

Because numeric character references are always 
treated as data when they are read, not markup.

Ah!!!!!!!!!!

So this is perfectly well-formed XML:

<Test foo="&#x3C;x>blah&#x3C;/x>"/>

And the numeric character references will be replaced during the parsing process to yield this:

<Test foo="<x>blah</x>"/>

Correct?

/Roger


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member