Open christianroy opened 7 years ago
The parser won't work if a node content is CDATA.
I have made a simple fix and will gladly make a PR if you want: https://github.com/christianroy/xml-parser/commit/c32d26fd6e354dc18a53b648480a6da96bfa7e73
The change in function content() is not very elegant, but that was after a full day of yack shaving and I could not figure a single regexp that would work. :( Nonetheless there are tests if anyone would like to try to implement something cleaner.
function content()
My output is also limited to the first encounter of a CDATA value :(
The parser won't work if a node content is CDATA.
I have made a simple fix and will gladly make a PR if you want: https://github.com/christianroy/xml-parser/commit/c32d26fd6e354dc18a53b648480a6da96bfa7e73
The change in
function content()
is not very elegant, but that was after a full day of yack shaving and I could not figure a single regexp that would work. :( Nonetheless there are tests if anyone would like to try to implement something cleaner.