fix segfault caused by addChild()
Support for parsing from Buffers
fix segfault for clone
fix child method: off-by-one error: child(0) == child(1)
…XmlNode reads xml_obj->doc->_private
…ew unrelated xmlNode to avoid the crashes. DO NOT suppose child is the newly added child: in some cases it's not.
For XML, this gives access to automatic encoding detection based on the XML declaration in the file. Parsing from a Buffer should also be a bit faster than parsing from a string, as the data in a buffer can be passed directly to libxml.
In preparation for adding support for buffers. The old names are still supported.
When an XPath expression evaluates to a boolean, number or string it gets turned into the corresponding JS value.
XPath expressions like '@attr' evaluate to a nodeset containing attributes. This would sometimes work in libxmljs (when the libxml xmlNode for an attribute already had a _private pointing to a libxmljs attribute wrapper). But in other cases you could end up with a libxmljs element wrapper wrapping a libxmljs xmlAttr. This makes it work in general.
…ces() now returns root element's namespaces.
Removed libxml/parser.h include Removed commented line from xml_document.cc Document.validate now returns a boolean value instead of int
NODE_PSYMBOL for early versions of node failed to prefix v8 types with v8:: therefore causing compilation errors if you were not already using the v8 namespace. fixes #102
This was holding a reference to the document and not allowing it to be cleaned up. closes #97
integrates better with existing error handling and stack printing
- no need to have a different class just for callbacks (less code)
If you want to parse a file, use the node fs module and then parseString.
- constructor function can take an object listing the callbacks (no longer does it provide an argument or require a function) - connect events to the parser using 'on' and other event emitter methods - setCallbacks no longer exists
- wrap some of the c++ classes in js (documented and easier to follow) - no longer can attributes and namespaces objects be created
Use the proper headers in the right files. Massive single header include files are bad form!
avoid using persistent handles for error objects