{"success":true,"data":{"ext":"xht","name":"XHT","description":"XHT is an XHTML document format developed and maintained by the World Wide Web Consortium (W3C) as an XML-based variant of HTML. It is used for web pages, structured documents, and content that must be processed by both HTML and XML tools, including browsers and publishing systems. Because it is text-based markup, the format is generally safe, though linked resources and embedded scripts may still present security concerns.","mime":["application/xhtml+xml"],"risk_level":"Safe","signatures":[{"hex":"3C 68 74 6D 6C 20 78 6D 6C 6E 73 3D","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"}]}],"related":["xhtml"],"usage":{"python":"def is_xht(file_path: str) -> bool:\n    \"\"\"Check if file is a valid XHT by magic bytes.\"\"\"\n    signature = bytes([0x3C, 0x68, 0x74, 0x6D, 0x6C, 0x20, 0x78, 0x6D, 0x6C, 0x6E, 0x73, 0x3D])\n    with open(file_path, \"rb\") as f:\n        return f.read(12) == signature","node":"function isXHT(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x3C, 0x68, 0x74, 0x6D, 0x6C, 0x20, 0x78, 0x6D, 0x6C, 0x6E, 0x73, 0x3D]);\n  return buffer.subarray(0, 12).equals(signature);\n}","go":"func IsXHT(data []byte) bool {\n    signature := []byte{0x3C, 0x68, 0x74, 0x6D, 0x6C, 0x20, 0x78, 0x6D, 0x6C, 0x6E, 0x73, 0x3D}\n    if len(data) < 12 {\n        return false\n    }\n    return bytes.Equal(data[:12], signature)\n}"}}}