New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

xml-reader

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml-reader

XML Reader and Parser

  • 2.4.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created

What is xml-reader?

The xml-reader npm package is a simple and lightweight XML parser that allows you to read and process XML data in a streaming manner. It is particularly useful for handling large XML files as it processes the data incrementally, reducing memory usage.

What are xml-reader's main functionalities?

Streaming XML Parsing

This feature allows you to parse XML data in a streaming fashion. The code sample demonstrates how to set up an XML reader and listen for specific tags, extracting attributes and values as they are encountered.

const xmlReader = require('xml-reader');
const xmlQuery = require('xml-query');

const xml = '<root><child name="foo">bar</child></root>';
const reader = xmlReader.create();

reader.on('tag:child', function (data) {
  console.log(data.attributes.name); // Outputs: foo
  console.log(data.children[0].value); // Outputs: bar
});

reader.parse(xml);

Other packages similar to xml-reader

Keywords

FAQs

Package last updated on 02 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc