The only legal names in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'. Replacing the generic call to the scanner with a specialized method which only allows these legal XML pseudo attribute names. This improves the performance of the XML scanner when it is processing the XML declaration.