Skip to main content

@dbushell/xml-streamify@0.4.0

Fetch and parse XML documents using the power of JavaScript web streams and async iterators ✨

Works with
It is unknown whether this package works with Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Browsers
JSR Score
100%
Published
a month ago
indexNode
class Node
deno add @dbushell/xml-streamify
import { Node } from "@dbushell/xml-streamify";
npx jsr add @dbushell/xml-streamify
import { Node } from "@dbushell/xml-streamify";
yarn dlx jsr add @dbushell/xml-streamify
import { Node } from "@dbushell/xml-streamify";
pnpm dlx jsr add @dbushell/xml-streamify
import { Node } from "@dbushell/xml-streamify";
bunx jsr add @dbushell/xml-streamify
import { Node } from "@dbushell/xml-streamify";

XML node with helper methods to read data and traverse the tree

Constructors

new
Node(type: string, parent?: Node, raw?: string)

Properties

readonly
attributes: Record<string, string>
readonly
children: Array<Node>
readonly
parent: Node | undefined
readonly
raw: string
readonly
type: string

Methods

addChild(child: Node): void
all(...keys: Array<string>): Array<Node>

Return all children matching the key hierarchy

first(key: string): Node | undefined

Return the first child matching the key

is(...keys: Array<string>): boolean

Returns true if node and parents match the key hierarchy