Skip to content
Browse files

Handle comments in XML parsing.

  • Loading branch information...
1 parent 9d73b8b commit f1a7a9dbda71c8e9ee704bbaf559035c68e81ad6 @christosc committed Mar 9, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/extensions/xml/wax_xml.m
View
4 lib/extensions/xml/wax_xml.m
@@ -129,6 +129,8 @@ static void createTable(lua_State *L, xmlNode *node, char *textLabel, char *attr
lua_rawset(L, -3);
break;
+ case XML_COMMENT_NODE: // do nothing if it's a comment
+ break;
default:
// I have no idea what these things are... XML is for weirdos
luaL_error(L, "UNKNOWN NODE TYPE %d", node->type);
@@ -289,4 +291,4 @@ void wax_xml_parseString(lua_State *L, const char *xml) {
parse(parseL);
lua_xmove(parseL, L, 1); // move the result to the current state
lua_remove(L, -2); // remove the parsing thread
-}
+}

0 comments on commit f1a7a9d

Please sign in to comment.
Something went wrong with that request. Please try again.