{"success":true,"data":{"ext":"xml","name":"XML","description":"Extensible Markup Language (XML) is a text-based markup format defined by the World Wide Web Consortium (W3C) for representing structured data in a machine-readable form. It is used for configuration files, data exchange, web services, document storage, and metadata in many software systems. XML is generally safe, but malformed documents can cause parsing errors, and external entity processing has historically led to security issues when handling untrusted files.","mime":["application/xml"],"risk_level":"Safe","signatures":[{"hex":"3C 3F 78 6D 6C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"3C 3F 58 4D 4C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"EF BB BF 3C 3F 78 6D 6C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"FF FE 3C 00 3F 00 78 00 6D 00 6C 00","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"FE FF 00 3C 00 3F 00 78 00 6D 00 6C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"3C 21 2D 2D","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"3C 3F 78 6D 6C 20","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["xsl","manifest","xhtml","xsd","cfg","htm"],"usage":{"python":"def is_xml(file_path: str) -> bool:\n    \"\"\"Check if file is a valid XML by magic bytes.\"\"\"\n    signature = bytes([0x3C, 0x3F, 0x78, 0x6D, 0x6C])\n    with open(file_path, \"rb\") as f:\n        return f.read(5) == signature","node":"function isXML(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x3C, 0x3F, 0x78, 0x6D, 0x6C]);\n  return buffer.subarray(0, 5).equals(signature);\n}","go":"func IsXML(data []byte) bool {\n    signature := []byte{0x3C, 0x3F, 0x78, 0x6D, 0x6C}\n    if len(data) < 5 {\n        return false\n    }\n    return bytes.Equal(data[:5], signature)\n}"},"category":"Web & Config"}}