MCPcopy Create free account
hub / github.com/denoland/std / XmlAttributeIterator

Interface XmlAttributeIterator

xml/types.ts:377–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375 * across elements.
376 */
377export interface XmlAttributeIterator {
378 /** The number of attributes. */
379 readonly count: number;
380
381 /** Get the raw attribute name at the given index. */
382 getName(index: number): string;
383
384 /** Get the decoded attribute value at the given index. */
385 getValue(index: number): string;
386
387 /**
388 * Get the colon index in the attribute name (-1 if no namespace prefix).
389 * This allows consumers to parse namespace prefixes without string allocation.
390 */
391 getColonIndex(index: number): number;
392
393 /**
394 * Get the resolved namespace URI for the attribute at the given index.
395 * Returns undefined if the attribute has no namespace prefix or the prefix
396 * is not bound (xmlns: attributes always return undefined as they declare
397 * rather than use namespaces).
398 */
399 getUri(index: number): string | undefined;
400}
401
402/**
403 * Callbacks for event-level output - enables zero-allocation event emission.

Callers 8

onStartElementFunction · 0.65
onStartTagCloseMethod · 0.65
onStartElementFunction · 0.65
onStartElementFunction · 0.65
onStartElementFunction · 0.65
onStartTagCloseMethod · 0.65
onStartElementFunction · 0.65
onStartElementFunction · 0.65

Implementers 1

AttributeIteratorImplxml/_parser.ts

Calls

no outgoing calls

Tested by

no test coverage detected