Search code examples
xmldouble-quotessingle-quotes

Is curled quote valid xml for attribute value


For example is the following line a valid xml

<?xml version=“1.0” encoding=“UTF-8” ?>

It would be very helpful if somebody also able to provide reference for this.


Solution

  • As for the reference, the XML specification is at https://www.w3.org/TR/REC-xml/ and the relevant rule is

    [10]    AttValue       ::=      
               '"' ([^<&"] | Reference)* '"'
            |  "'" ([^<&'] | Reference)* "'"