{"name":"@file-type/xml","version":"1.1.1","description":"XML detection plugin for file-type","type":"module","types":"./lib/index.d.ts","exports":"./lib/index.js","scripts":{"clean":"del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'src/**/*.d.ts'","compile-src":"tsc -p lib","compile":"yarn run  compile-src","lint:ts":"biome check","build":"yarn run clean && yarn compile","test":"mocha","prepublishOnly":"yarn run build","update-biome":"yarn add -D --exact @biomejs/biome && npx @biomejs/biome migrate --write"},"keywords":["file-type","detect","detection","detector","XML","signature","namespace","SVG","XHTML","RSS","KML","GML","MusicXML","plist","property list","xliff","xlf","docbook","TEI","x3d","atom","TTML","SMIL","OPML","MathML","GPX"],"dependencies":{"sax":"^1.6.0","strtok3":"^10.3.5"},"devDependencies":{"@biomejs/biome":"2.4.14","@types/sax":"^1.2.7","chai":"^6.2.2","del-cli":"^6.0.0","file-type":"^21.3.4","mocha":"^11.7.5","typescript":"^6.0.3"},"author":{"name":"Borewit","url":"https://github.com/Borewit"},"repository":{"type":"git","url":"git+https://github.com/Borewit/file-type-xml.git"},"license":"MIT","packageManager":"yarn@4.9.1","_id":"@file-type/xml@1.1.1","gitHead":"b1b9482c0993d7a3852e05376a5d3c57e03d577d","bugs":{"url":"https://github.com/Borewit/file-type-xml/issues"},"homepage":"https://github.com/Borewit/file-type-xml#readme","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-kBGlafpgT5n6Uv3eUhrbyX9Lm85Lbwd7IWrOlsWxGCzUSkG17xsr/fO4CU4AUnYgeEZJqmAFX2eshlU3RDZ55g==","shasum":"2b6893ccec6fd66fe9506305800d4684633e1ffd","tarball":"http://registry-npm.ywwl.com/@file-type/xml/download/@file-type/xml-1.1.1.tgz","fileCount":7,"unpackedSize":17106,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGjJak4YrYqg8FZ9Aqf0VtVbBeyHoVj1ef9xBH2j26ZNAiBnTOqHCcVFQB8dJEbo6rrRJLKdayw5fKeTSj7pWvtAxg=="}],"size":5605,"noattachment":false,"key":"/@file-type/xml/-/@file-type/xml-1.1.1.tgz"},"_npmUser":{"name":"borewit","email":"borewit@xs4all.nl"},"directories":{},"maintainers":[{"name":"borewit","email":"borewit@xs4all.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/xml_1.1.1_1777835752479_0.9314591273724337"},"_hasShrinkwrap":false,"readme":"[![NPM version](https://img.shields.io/npm/v/@file-type/xml.svg)](https://npmjs.org/package/@file-type/xml)\n[![Node.js CI](https://github.com/Borewit/file-type-xml/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/Borewit/file-type-xml/actions/workflows/nodejs-ci.yml)\n[![npm downloads](http://img.shields.io/npm/dm/@file-type/xml.svg)](https://npmcharts.com/compare/@file-type/xml?start=365)\n\n# @file-type/xml\n\nDetector plugin for [file-type](https://github.com/sindresorhus/file-type) for XML files.\n\n## Installation\n\n```bash\nnpm install @file-type/xml\n```\n\n## Usage\n\nThe following example shows how to add the XML detector to [file-type](https://github.com/sindresorhus/file-type).\n```js\nimport {FileTypeParser} from 'file-type';\nimport {detectXml} from '@file-type/xml';\n\nconst parser = new FileTypeParser({customDetectors: [detectXml]});\nconst fileType = await parser.fromFile('example.kml');\nconsole.log(fileType);\n```\n\nYou can also use the XML detector outside [file-type](https://github.com/sindresorhus/file-type):\n```js\nimport {XmlTextDetector} from '@file-type/xml';\n\nconst xmlTextDetector = new XmlTextDetector();\nxmlTextDetector.write('<svg xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#00CD9F\"/></svg>');\nconst fileType = xmlTextDetector.fileType;\nconsole.log(JSON.stringify(fileType)); // Outputs: {\"ext\":\"svg\",\"mime\":\"image/svg+xml\"}\n```\n\n## Support file formats\n\n- [XML](https://en.wikipedia.org/wiki/XML) (default for XML, unless a more specific format was detected)\n- [Apple Property list, `.plist`](https://en.wikipedia.org/wiki/Property_list)\n- [Atom](<https://en.wikipedia.org/wiki/Atom_(web_standard)>)\n- [DocBook](https://en.wikipedia.org/wiki/DocBook)\n- [GML (Geography Markup Language)](https://en.wikipedia.org/wiki/Geography_Markup_Language)\n- [GPX (GPS Exchange Format)](https://en.wikipedia.org/wiki/GPS_Exchange_Format)\n- [KML (Keyhole Markup Language)](https://en.wikipedia.org/wiki/Keyhole_Markup_Language)\n- [MathML (Mathematical Markup Language)](https://en.wikipedia.org/wiki/MathML)\n- [MusicXML, Uncompressed](https://en.wikipedia.org/wiki/MusicXML)\n- [OPML (Outline Processor Markup Language)](https://en.wikipedia.org/wiki/OPML)\n- [RSS (RDF Site Summary or Really Simple Syndication)](https://en.wikipedia.org/wiki/RSS)\n- [SMIL: (Synchronized Multimedia Integration Language)](https://en.wikipedia.org/wiki/Synchronized_Multimedia_Integration_Language)\n- [SVG: (Scalable Vector Graphics)](https://en.wikipedia.org/wiki/SVG)\n- [TEI, Text Encoding Initiative](https://en.wikipedia.org/wiki/Text_Encoding_Initiative)\n- [TTML: (Timed Text Markup Language)](https://en.wikipedia.org/wiki/Timed_Text_Markup_Language)\n- [X3D (Extensible 3D)](https://en.wikipedia.org/wiki/X3D)\n- [XHTML](https://en.wikipedia.org/wiki/XHTML)\n- [XLIFF (XML Localization Interchange File Format)](https://en.wikipedia.org/wiki/XLIFF)\n\n## Licence\n\nThis project is licensed under the [MIT License](LICENSE.txt). Feel free to use, modify, and distribute as needed.\n","publish_time":1777835752624,"_cnpm_publish_time":1777835752624,"dist-tags":{"latest":"1.2.0"}}