Coder Social home page Coder Social logo

klortho / libxmljs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libxmljs/libxmljs

0.0 2.0 0.0 2.32 MB

libxml bindings for v8 javascript engine

Home Page: https://github.com/polotek/libxmljs/wiki

License: MIT License

Makefile 0.10% Python 0.46% JavaScript 38.83% C++ 60.61%

libxmljs's Introduction

@klortho/libxmljs

Build Status

Fork of polotek/libxmljs

Package @klortho/libxmljs, version 0.17.2.

This is a fork of polotek/libxmljs. I opened this pull request, but I haven't gotten any response. This fork adds the ability to set the base-url for XML files, so that references to DTDs, for example, will work.

That pull request is from the master branch, here. So, I set the default branch to cfm-baseurl-for-xml, and published my new version from here.

See also the cfm-libxmljs-mt branch, which was where I started -- forked from libxmljs-mt. I had originally submitted this PR on that repo, but the author there suggested that I submit my PR upstream, so that's what I did.

I gave it version 0.17.2, which is one patch up from libxmljs-mt.


LibXML bindings for node.js

Install with:

npm install libxmljs
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"

Support

API and Examples

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

See the examples folder.

Contributing

To do development, so these once:

npm install -g node-gyp
npm install
npm test
npm link

From then on, if you make changes:

make         #=> incremental build
npm build .  #=> complete rebuild
npm test

Start by checking out the open issues. Specifically the desired feature ones.

Requirements

Make sure you have met the requirements for node-gyp. You DO NOT need to manually install node-gyp; it comes bundled with node.

libxmljs's People

Contributors

alfyboza avatar azuisleet avatar bhamon avatar dachev avatar defunctzombie avatar dpw avatar dudochkin-victor avatar gagern avatar greut avatar hildjj avatar isaacs avatar jdesboeufs avatar jhs67 avatar jmandel avatar joshdata avatar katoken-0215 avatar kkoopa avatar klortho avatar lanoxx avatar ncb000gt avatar polotek avatar rchipka avatar rprinz08 avatar skabbes avatar sprsquish avatar taf2 avatar teleological avatar thomas-riccardi avatar tootallnate avatar vgrichina avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.