An SVG file is basically an XML file so I could use the string (or the hex representation: \'3c 3f 78 6d 6c\') as a
SVG
XML
(or the hex representation: \'3c 3f 78 6d 6c\') as a
\'3c 3f 78 6d 6c\'
You could try reading the beginning of the file as binary - if you can't find any magic numbers, you read it as a text file and match to any textual patterns you wish. Or vice-versa.