Skip to main content

Built and signed on GitHub Actions

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

This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
100%
Published
4 months ago (0.4.0)
class Node

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

Add Package

deno add @dbushell/xml-streamify

Import symbol

import { Node } from "@dbushell/xml-streamify/node";

Add Package

npx jsr add @dbushell/xml-streamify

Import symbol

import { Node } from "@dbushell/xml-streamify/node";

Add Package

yarn dlx jsr add @dbushell/xml-streamify

Import symbol

import { Node } from "@dbushell/xml-streamify/node";

Add Package

pnpm dlx jsr add @dbushell/xml-streamify

Import symbol

import { Node } from "@dbushell/xml-streamify/node";

Add Package

bunx jsr add @dbushell/xml-streamify

Import symbol

import { Node } from "@dbushell/xml-streamify/node";