Skip to main content
Home

Built and signed on GitHub Actions

A fast XML scanner/parser with no dependencies. Given an XML string, the xml scanner will parse the XML and invoke the defined events on the specified paths.

This package works with Node.js, Deno, Bun, BrowsersIt is unknown whether this package works with Cloudflare Workers
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 Bun
This package works with Browsers
JSR Score
100%
Published
11 months ago (1.0.0)
f
addAttributeEvent

Add an attribute event to the trie structure.

f
addElement

Add an element to the trie structure.

T
AttributeEvent

Event triggered when an attribute value is encountered.

T
CdataEvent

Event triggered when CDATA content is encountered.

T
CommentEvent

Event triggered when a comment is encountered.

f
emptyXmlEvents
No documentation available
f
parseElementPath
No documentation available
T
ProcessingInstructionEvent

Event triggered when a processing instruction is encountered.

T
TagCloseEvent

Event triggered when an XML tag is closed.

T
TagOpenEvent

Event triggered when an XML tag is opened.

T
TextEvent

Event triggered when text content is encountered.

f
unEntity

Decodes XML entities in a string. If an invalid entity is encountered it is left unchanged in the result

f
xmlAnalyser

Analyzes the given XML string and returns a sorted array of unique paths and elements found within the XML. The paths include tags, attributes, text content, CDATA sections, processing instructions, and comments.

T
XmlDeclarationEvent

Event triggered when an XML declaration is encountered. The XML declaration can only appear as the first token in the XML document.

T
XmlDocTypeEvent

Event triggered when a DOCTYPE declaration is encountered. The DOCTYPE declaration can only appear before the root element in the XML document.

c
XmlParsingError

Error class for XML parsing errors.

T
XmlParsingErrorCode

Error codes as a type for XML parsing errors.

f
xmlScanner

Execute the XML scanner. The XML scanner will parse the XML string and invoke the defined by xmlEvents t rie.

T
XmlUnknownAttributeEvent

Event triggered when an unknown attribute is encountered.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.