Skip to content

Commit

Permalink
Fix conversion problem
Browse files Browse the repository at this point in the history
  • Loading branch information
puritys committed Sep 28, 2015
1 parent da5c591 commit 1d01190
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nodeExt/phplikeXml.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NAN_METHOD(phpXMLDocument::load) {
d->doc.LoadFile(file.c_str());

//NanReturnValue(parseXML(d));
Handle<Object> obj = parseXML(d);
Local<Object> obj = parseXML(d);
//Nan::Set(obj, Nan::New("key").ToLocalChecked(), Nan::New("value").ToLocalChecked());

info.GetReturnValue().Set(obj);
Expand All @@ -48,14 +48,14 @@ NAN_METHOD(phpXMLDocument::loadXML) {
d->doc.Parse(content.c_str(), content.length());

// NanReturnValue(parseXML(d));
Handle<Object> obj = parseXML(d);
Local<Object> obj = parseXML(d);
info.GetReturnValue().Set(obj);
}

Handle<Object> phpXMLDocument::parseXML(phpXMLDocument *d) {
XMLNode* root = d->doc.RootElement();

Handle<Object> object = Nan::New<Object>();
Local<Object> object = Nan::New<Object>();
for (XMLNode* node=root; node; node=node->NextSibling() ) {
XMLNode* firstChildElement = node->FirstChildElement();
XMLNode* firstChild = node->FirstChild();
Expand Down

0 comments on commit 1d01190

Please sign in to comment.