sandbox-xml
Parse XML feeds and sitemaps in a Code node or CodeAct action, with fast-xml-parser running on the host
- License 许可
- AGPL-3.0
- 最近更新
- 2026-08-18
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- sandbox-xml
- description
- Parse XML feeds and sitemaps in a Code node or CodeAct action, with fast-xml-parser running on the host
02 资源文件 1
- 参考文档package.json855 B
03 SKILL.md 正文
XML in the sandbox
Specifier: @nodetool-ai/sandbox-xml. Declare it in the node's packages
property and import it at the top of the body.
fast-xml-parser reads a bare window, which the guest does not have, so it
cannot be compiled in. This pack is a host module: the import resolves to a
generated facade over NodeTool's own implementation.
parse — XML to a plain object
import { parse } from "@nodetool-ai/sandbox-xml";
const feed = await parse(inputs.xml);
const items = feed?.rss?.channel?.item ?? [];
return { titles: items.map((i) => i.title) };
Attributes ride along prefixed @_ so they never collide with child-element
keys; pass { attributes: false } to drop them. Text values stay text — a
numeric-looking id must not change shape between runs.
Invalid XML throws with the parser's own reason rather than returning a partial tree.
Gotchas
parseis async.- 5 MB of text per call.
- A single child is not an array.
channel.itemis one object when the feed has one item; normalize with[].concat(x ?? []).
04 同仓库更多 Skills
sandbox-zip
Read and write zip archives in a Code node or CodeAct action, with fflate running on the host under a 50 MB inflation cap
sandbox-yaml
Read and write YAML inside a Code node or CodeAct action, with js-yaml running in the guest
sandbox-xlsx
Read and write Excel workbooks in a Code node or CodeAct action, with exceljs running on the host
sandbox-twilio
Send SMS and WhatsApp messages and look up numbers from a Code node or CodeAct action, with NodeTool's Twilio request builder running on the host
sandbox-tfjs
Classify and embed images, detect objects, and answer from a passage in a Code node or CodeAct action, with TensorFlow.js running on the host
sandbox-supabase
Read and write Supabase tables from a Code node or CodeAct action, with NodeTool's PostgREST request builder running on the host