-
Notifications
You must be signed in to change notification settings - Fork 604
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
adding parseStringSync + simple tests (continued) #319
Conversation
@mrparkers About that comment: the (Also, sorry for taking so long, busy week) |
Okay, I will try to address this when I have some free time. Thanks! |
Create a sync version of parseString to API to permit calling without a callback. The current implemenation is sync due to underlying implementation of SAX parser. Examples: ```js // Via root API var result = xml2js.parseStringSync('< ... >', options) // Via parser var parser = new xml2js.Parser(options); var result = parser.parseStringSync('< ... >'); ``` See Leonidas-from-XIV#241 by @nobodyname See Leonidas-from-XIV#319 by @mrparkers
Create a sync version of parseString to API to permit calling without a callback. The current implemenation is sync due to underlying implementation of SAX parser. Examples: ```js // Via root API var result = xml2js.parseStringSync('< ... >', options) // Via parser var parser = new xml2js.Parser(options); var result = parser.parseStringSync('< ... >'); ``` See Leonidas-from-XIV#241 by @nobodyman See Leonidas-from-XIV#319 by @mrparkers
Rebased these changes and added support for options in #422 |
Thanks @mckramer, I'll close this in favor of your PR. I haven't needed this for quite some time now. |
Create a sync version of parseString to API to permit calling without a callback. The current implemenation is sync due to underlying implementation of SAX parser. Examples: ```js // Via root API var result = xml2js.parseStringSync('< ... >', options) // Via parser var parser = new xml2js.Parser(options); var result = parser.parseStringSync('< ... >'); ``` See Leonidas-from-XIV#241 by @nobodyman See Leonidas-from-XIV#319 by @mrparkers
Apologies for getting this in so late, I haven't had the free time to work on this until now.
This PR is to address the comments made by @Leonidas-from-XIV in #241. Please refer to that PR for more context around these changes.
I'm pretty sure I got everything, except I was a bit confused by the comment asking for
parseStringSync
to adhere to the API ofparseString
. If that could get cleared up for me, I can take a stab at that as well.Thanks!