A couple tests for finding data with namespaces.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Merge branch 'master' into nsxpath
Encoding and baseUrl can be specified for html

Some HTML documents may have incorrect meta tags which puts libxml out
of its default utf-8 parsing mode.  Allow these optional parameters to
parseHtml so users can have control of this in theses situations.
Merge pull request #167 from CodeFridge/feature/encoding_option2

Encoding and baseUrl can be specified for html
pull version from package.json

Ensures that version exported matches the installed module.

Conflicts:
	src/libxmljs.h
GH-172 - SetDtd on XmlDocument

This should allow a user to set the doctype on a document. Internally
uses the createIntSubset function and applies the dtd to the document
passed into the function.

There were some issues relating to removal of the dtd by calling
xmlCreateIntSubset so instead we first have to get the dtd node, and
then basically remove it and free it before we can apply the new dtd.
This might be better as a few split api's rather than just one lump api
but I figured it would be a little easier this way.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Added cstring include.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
fix typo on readme
move cdata example from readme to examples folder
remove 'liblibxmljs' from bindings.gyp

The double lib causes problems for windows (and apprently was a hack
anyway). The compiled bindings can just be called xmljs.
add NODE_MDOULE macro invocation

This is the proper way node c++ modules should initialize themselves.
convert LXJS_GET_PARSER_FROM_CONTEXT into a function

Macros are inconsistent across platforms and bad practice unless no
other way is available. The uses of this macro are fine with a function
call.
add a test for double free detection
Styling and error handling.

I fixed some stylistic things relating to single line if statements.

I moved some of the checks to the JS side of the house. Because we need
to pass NULL to xmlCreateIntSubset for the last two params for them to
be ignored, we have to do some checks in the C++ side. In order to deal
with this I used strdup to grab the content of the v8::String.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Remove strdup.

No need for explicit use of strdup + free, the refs will be cleaned up
with the handles.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Cleaned up tabs and spacing for stylistic reasons.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Merge branch 'GH-172'
Always clean before running the tests...guarantees the latest will be tested.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Merge branch 'master' of github.com:polotek/libxmljs
GH-179: Remove strdup and use Opt pattern.

Remove the use of strdup and associated frees and use the opt pattern.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>