New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure that children are freed before their parents #324
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Avoids blocking new features and fixes until the fix for reference counting is introduced.
set toString() to output formatted output
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Expose line numbers when parsing from string
This makes it easier to build on multiple OSes as well as avoids having to install additional packages or external deps when trying to use this module.
Remove requirement to have libxml2-dev or whatever installed. The libxml2 sources ship with this module.
we don't need zlib support see libxmljs#195
Contributors can be helpful by doing the features we have greenlit.
…assed to xmllib's underlying XML parsing function The options argument, if provided, is an object whose keys correspond to flags defined in xml_document.cc. If the corresponding value of the key is true (or true-like), the flag xmlParserOption flag gets passed to xmlReadMemory. Example: libxmljs.parseXml(xml, {noblanks: true}); which is particularly useful when calling toString() to produce formatted output on the document later. If you parse an XML string that has indentation, insert some nodes, and then try toString() on it, it won't indent the new nodes properly unless `noblanks` is set in the options. See: http://xmlsoft.org/html/libxml-parser.html#xmlParserOption
add an options argument to parseXml
* This commit makes it possible to create XML commment nodes in nodejs. * A new XmlComment class is introduced which exports a method text() to get and set the comment content. * This patch also includes tests to assert comment creation and the getting and setting of comment content through the text() function.
Comments: Add initial support and tests
Node 0.11+ uses a version of v8 which has radically changed APIs. NAN is a project to support legacy and currency versions of the v8 apis.
HTML documents have lax parsing and can be created even without a root node. This results in errors when the document defers methods to the root node. This patch catches that circumstance and throws more descriptive errors to let you know what went wrong.
HTML document throws better errors when there is no root node
add assertion to catch failed attribute creation
update nan to 1.5.1 and fix issues with the latest v8
Added support for RELAX NG schema validation
Add .namespace() to Attribute
Upgrade to NAN 1.7.0
package.json: Add license attribute
Bindings for list of features from xmlHasFeature
Needed for node-gyp v2.0.0
…and check for already freed node
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request causes XmlNodes to Ref() their parents. This causes parent node's ref count to increase, which means that it won't be GC'ed until the ref count goes back down to 0. When the child node's destructor is called, it Unref()'s the parent node. This forces parent nodes to stick around while there are still children that haven't been freed.