Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libxmljs

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libxmljs

libxml bindings for v8 javascript engine

  • 0.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
61K
decreased by-11.72%
Maintainers
2
Weekly downloads
 
Created
Source

Libxmljs

Build Status

LibXML bindings for node.js

var libxmljs = require("libxmljs");
var xml =  '<?xml version="1.0" encoding="UTF-8"?>' +
           '<root>' +
               '<child foo="bar">' +
                   '<grandchild baz="fizbuzz">grandchild content</grandchild>' +
               '</child>' +
               '<sibling>with content!</sibling>' +
           '</root>';

var xmlDoc = libxmljs.parseXml(xml);

// xpath queries
var gchild = xmlDoc.get('//grandchild');

console.log(gchild.text());  // prints "grandchild content"

var children = xmlDoc.root().childNodes();
var child = children[0];

console.log(child.attr('foo').value()); // prints "bar"

Basics

API and Examples

Check out the wiki http://github.com/polotek/libxmljs/wiki.

See the examples folder.

Requirements

You will need have the libxml2 library installed and also the libxml2-devel (libxml2-dev on debian systems) package. This comes with the xml2-config utility that is needed for compiling. This command must be in your path.

Installation

npm

npm install libxmljs

source

To build with node-gyp:

node-gyp configure
node-gyp build

Alternatively, run make.

tests

npm test

FAQs

Package last updated on 11 Feb 2013

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