{"_id":"@elchika-inc/html-to-xml","_rev":"2-77137d7c92cd7eb29fd6dafa0ca4c066","name":"@elchika-inc/html-to-xml","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@elchika-inc/html-to-xml","version":"0.1.0","keywords":["html","xml","structured","convert","parser","cheerio"],"author":{"name":"naoto24kawa"},"license":"MIT","_id":"@elchika-inc/html-to-xml@0.1.0","maintainers":[{"name":"naoto24kawa","email":"naoto24kawa@gmail.com"}],"homepage":"https://github.com/elchika-inc/html-to-xml#readme","bugs":{"url":"https://github.com/elchika-inc/html-to-xml/issues"},"dist":{"shasum":"5bb8e8d392888402828ff6900004d2eefea84a2c","tarball":"https://registry.npmjs.org/@elchika-inc/html-to-xml/-/html-to-xml-0.1.0.tgz","fileCount":4,"integrity":"sha512-6nlcdZkt0mkp8V+Cw+B6lWFj9M6YR54Bqha1dRWw/v3fb0AeWJ6gUbzHq922tE/vYWGjt+mg73MA2igwVX94xQ==","signatures":[{"sig":"MEYCIQCVeReVtS06l1YfJTXbzKOE8lHLgZApRUON7zyElicksAIhAL8vU4h3N45Blfp7CtcsdjkTara8TkA4VqB06oKdk1hA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8834},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"bun":">=1.0.0","node":">=18.0.0"},"scripts":{"test":"bun test","build":"tsc","clean":"rm -rf dist","npm:publish":"npm publish --access public","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"naoto24kawa","actor":{"name":"naoto24kawa","type":"user","email":"naoto24kawa@gmail.com"},"email":"naoto24kawa@gmail.com"},"repository":{"url":"git+https://github.com/elchika-inc/html-to-xml.git","type":"git"},"_npmVersion":"10.9.2","description":"Convert HTML content to structured XML format","directories":{},"_nodeVersion":"23.11.0","dependencies":{"cheerio":"^1.0.0-rc.12"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/html-to-xml_0.1.0_1750948417819_0.1089723200819257","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2025-06-26T14:33:37.732Z","modified":"2026-06-01T10:17:07.689Z","0.1.0":"2025-06-26T14:33:38.007Z"},"bugs":{"url":"https://github.com/elchika-inc/html-to-xml/issues"},"author":{"name":"naoto24kawa"},"license":"MIT","homepage":"https://github.com/elchika-inc/html-to-xml#readme","keywords":["html","xml","structured","convert","parser","cheerio"],"repository":{"url":"git+https://github.com/elchika-inc/html-to-xml.git","type":"git"},"description":"Convert HTML content to structured XML format","maintainers":[{"name":"naoto24kawa","email":"naoto24kawa@gmail.com"}],"readme":"# @elchika-inc/html-to-xml\n\nConvert HTML content to structured XML format using Cheerio.\n\n## Installation\n\n```bash\nnpm install @elchika-inc/html-to-xml\n```\n\n## Usage\n\n```typescript\nimport { HtmlToXmlConverter } from '@elchika-inc/html-to-xml';\n\nconst html = `\n<h1>Hello World</h1>\n<p>This is a paragraph.</p>\n<ul>\n  <li>Item 1</li>\n  <li>Item 2</li>\n</ul>\n<a href=\"https://example.com\">Link</a>\n<img src=\"image.jpg\" alt=\"Example image\">\n`;\n\n// Basic conversion\nconst xml = HtmlToXmlConverter.convert(html);\nconsole.log(xml);\n// Output:\n// <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n// <document>\n//   <content>\n//     <headings>\n//       <heading level=\"1\"><![CDATA[Hello World]]></heading>\n//     </headings>\n//     <paragraphs>\n//       <paragraph><![CDATA[This is a paragraph.]]></paragraph>\n//     </paragraphs>\n//     <links>\n//       <link url=\"https://example.com\"><![CDATA[Link]]></link>\n//     </links>\n//     <images>\n//       <image src=\"image.jpg\" alt=\"Example image\"/>\n//     </images>\n//     <lists>\n//       <list type=\"unordered\">\n//         <item><![CDATA[Item 1]]></item>\n//         <item><![CDATA[Item 2]]></item>\n//       </list>\n//     </lists>\n//   </content>\n// </document>\n\n// With title\nconst xmlWithTitle = HtmlToXmlConverter.convert(html, {\n  includeTitle: true,\n  title: 'My Document'\n});\n```\n\n## XML Structure\n\nThe generated XML follows this structure:\n\n- `<document>` - Root element\n  - `<title>` - Optional title (if provided)\n  - `<content>` - Main content container\n    - `<headings>` - Contains all heading elements\n    - `<paragraphs>` - Contains all paragraph text\n    - `<links>` - Contains all links with URLs\n    - `<images>` - Contains all images with sources\n    - `<lists>` - Contains all lists (ordered/unordered)\n\n## API\n\n### `HtmlToXmlConverter.convert(html, options?)`\n\nConvert HTML to structured XML.\n\n**Options:**\n- `includeTitle` (boolean, default: false) - Include title element\n- `title` (string) - Title to include if `includeTitle` is true\n\n## License\n\nMIT","readmeFilename":"README.md"}